mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	Merge remote-tracking branch 'origin/stable' into redesign
# Conflicts: # package-lock.json # package.json
This commit is contained in:
		
						commit
						205f9953f9
					
				
							
								
								
									
										2
									
								
								libraries/ckeditor/ckeditor.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								libraries/ckeditor/ckeditor.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -2,7 +2,7 @@ | |||||||
|   "name": "trilium", |   "name": "trilium", | ||||||
|   "productName": "Trilium Notes", |   "productName": "Trilium Notes", | ||||||
|   "description": "Trilium Notes", |   "description": "Trilium Notes", | ||||||
|   "version": "0.47.2", |   "version": "0.47.3", | ||||||
|   "license": "AGPL-3.0-only", |   "license": "AGPL-3.0-only", | ||||||
|   "main": "electron.js", |   "main": "electron.js", | ||||||
|   "bin": { |   "bin": { | ||||||
| @ -80,7 +80,7 @@ | |||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "cross-env": "7.0.3", |     "cross-env": "7.0.3", | ||||||
|     "electron": "13.0.0-beta.28", |     "electron": "13.0.1", | ||||||
|     "electron-builder": "22.11.3", |     "electron-builder": "22.11.3", | ||||||
|     "electron-packager": "15.2.0", |     "electron-packager": "15.2.0", | ||||||
|     "electron-rebuild": "2.3.5", |     "electron-rebuild": "2.3.5", | ||||||
|  | |||||||
| @ -7,8 +7,14 @@ const {LOG_DIR} = require('../../services/data_dir.js'); | |||||||
| function getBackendLog() { | function getBackendLog() { | ||||||
|     const file = `${LOG_DIR}/trilium-${dateUtils.localNowDate()}.log`; |     const file = `${LOG_DIR}/trilium-${dateUtils.localNowDate()}.log`; | ||||||
| 
 | 
 | ||||||
|  |     try { | ||||||
|         return fs.readFileSync(file, 'utf8'); |         return fs.readFileSync(file, 'utf8'); | ||||||
|     } |     } | ||||||
|  |     catch (e) { | ||||||
|  |         // most probably the log file does not exist yet - https://github.com/zadam/trilium/issues/1977
 | ||||||
|  |         return ""; | ||||||
|  |     } | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| module.exports = { | module.exports = { | ||||||
|     getBackendLog |     getBackendLog | ||||||
|  | |||||||
| @ -11,7 +11,7 @@ function sanitize(dirtyHtml) { | |||||||
|             'figure', 'span', 'label', 'input' |             'figure', 'span', 'label', 'input' | ||||||
|         ], |         ], | ||||||
|         allowedAttributes: { |         allowedAttributes: { | ||||||
|             'a': [ 'href', 'class' ], |             'a': [ 'href', 'class', 'data-note-path' ], | ||||||
|             'img': [ 'src' ], |             'img': [ 'src' ], | ||||||
|             'section': [ 'class', 'data-note-id' ], |             'section': [ 'class', 'data-note-id' ], | ||||||
|             'figure': [ 'class' ], |             'figure': [ 'class' ], | ||||||
|  | |||||||
| @ -307,6 +307,14 @@ async function importZip(taskContext, fileBuffer, importRootNote) { | |||||||
|                 return `href="#root/${targetNoteId}"`; |                 return `href="#root/${targetNoteId}"`; | ||||||
|             }); |             }); | ||||||
| 
 | 
 | ||||||
|  |             content = content.replace(/data-note-path="([^"]*)"/g, (match, notePath) => { | ||||||
|  |                 const noteId = notePath.split("/").pop(); | ||||||
|  | 
 | ||||||
|  |                 const targetNoteId = noteIdMap[noteId]; | ||||||
|  | 
 | ||||||
|  |                 return `data-note-path="root/${targetNoteId}"`; | ||||||
|  |             }); | ||||||
|  | 
 | ||||||
|             if (noteMeta) { |             if (noteMeta) { | ||||||
|                 const includeNoteLinks = (noteMeta.attributes || []) |                 const includeNoteLinks = (noteMeta.attributes || []) | ||||||
|                     .filter(attr => attr.type === 'relation' && attr.name === 'includeNoteLink'); |                     .filter(attr => attr.type === 'relation' && attr.name === 'includeNoteLink'); | ||||||
|  | |||||||
| @ -41,13 +41,17 @@ function initLogFile() { | |||||||
| function checkDate(millisSinceMidnight) { | function checkDate(millisSinceMidnight) { | ||||||
|     if (millisSinceMidnight >= DAY) { |     if (millisSinceMidnight >= DAY) { | ||||||
|         initLogFile(); |         initLogFile(); | ||||||
|  | 
 | ||||||
|  |         millisSinceMidnight =- DAY; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     return millisSinceMidnight; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function log(str) { | function log(str) { | ||||||
|     const millisSinceMidnight = Date.now() - todaysMidnight.getTime(); |     let millisSinceMidnight = Date.now() - todaysMidnight.getTime(); | ||||||
| 
 | 
 | ||||||
|     checkDate(millisSinceMidnight); |     millisSinceMidnight = checkDate(millisSinceMidnight); | ||||||
| 
 | 
 | ||||||
|     logFile.write(formatTime(millisSinceMidnight) + ' ' + str + NEW_LINE); |     logFile.write(formatTime(millisSinceMidnight) + ' ' + str + NEW_LINE); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam