mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	fix(code): syntax highlighting not working in read-only code
This commit is contained in:
		
							parent
							
								
									b1f08b944a
								
							
						
					
					
						commit
						c24e1f0ec5
					
				| @ -61,6 +61,7 @@ export default class AbstractCodeTypeWidget extends TypeWidget { | ||||
|      */ | ||||
|     _update(note: FNote, content: string) { | ||||
|         this.codeEditor.setText(content); | ||||
|         this.codeEditor.setMimeType(note.mime); | ||||
|         this.codeEditor.clearHistory(); | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -66,7 +66,6 @@ export default class EditableCodeTypeWidget extends AbstractCodeTypeWidget { | ||||
|             this._update(note, blob?.content ?? ""); | ||||
|         }); | ||||
| 
 | ||||
|         this.codeEditor.setMimeType(note.mime); | ||||
|         this.show(); | ||||
| 
 | ||||
|         if (this.parent && hasTouchBar) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran