mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +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", | ||||
|   "productName": "Trilium Notes", | ||||
|   "description": "Trilium Notes", | ||||
|   "version": "0.47.2", | ||||
|   "version": "0.47.3", | ||||
|   "license": "AGPL-3.0-only", | ||||
|   "main": "electron.js", | ||||
|   "bin": { | ||||
| @ -80,7 +80,7 @@ | ||||
|   }, | ||||
|   "devDependencies": { | ||||
|     "cross-env": "7.0.3", | ||||
|     "electron": "13.0.0-beta.28", | ||||
|     "electron": "13.0.1", | ||||
|     "electron-builder": "22.11.3", | ||||
|     "electron-packager": "15.2.0", | ||||
|     "electron-rebuild": "2.3.5", | ||||
|  | ||||
| @ -7,8 +7,14 @@ const {LOG_DIR} = require('../../services/data_dir.js'); | ||||
| function getBackendLog() { | ||||
|     const file = `${LOG_DIR}/trilium-${dateUtils.localNowDate()}.log`; | ||||
| 
 | ||||
|     try { | ||||
|         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 = { | ||||
|     getBackendLog | ||||
|  | ||||
| @ -11,7 +11,7 @@ function sanitize(dirtyHtml) { | ||||
|             'figure', 'span', 'label', 'input' | ||||
|         ], | ||||
|         allowedAttributes: { | ||||
|             'a': [ 'href', 'class' ], | ||||
|             'a': [ 'href', 'class', 'data-note-path' ], | ||||
|             'img': [ 'src' ], | ||||
|             'section': [ 'class', 'data-note-id' ], | ||||
|             'figure': [ 'class' ], | ||||
|  | ||||
| @ -307,6 +307,14 @@ async function importZip(taskContext, fileBuffer, importRootNote) { | ||||
|                 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) { | ||||
|                 const includeNoteLinks = (noteMeta.attributes || []) | ||||
|                     .filter(attr => attr.type === 'relation' && attr.name === 'includeNoteLink'); | ||||
|  | ||||
| @ -41,13 +41,17 @@ function initLogFile() { | ||||
| function checkDate(millisSinceMidnight) { | ||||
|     if (millisSinceMidnight >= DAY) { | ||||
|         initLogFile(); | ||||
| 
 | ||||
|         millisSinceMidnight =- DAY; | ||||
|     } | ||||
| 
 | ||||
|     return millisSinceMidnight; | ||||
| } | ||||
| 
 | ||||
| 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); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam