mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-12 21:31:36 +08:00
fix(highlighting): highlighting not always applying to read-only text at first start
This commit is contained in:
parent
df6797d9ea
commit
9a9e990e97
@ -45,6 +45,7 @@ export async function applySingleBlockSyntaxHighlight($codeBlock: JQuery<HTMLEle
|
|||||||
|
|
||||||
let highlightedText = null;
|
let highlightedText = null;
|
||||||
if (normalizedMimeType === mime_types.MIME_TYPE_AUTO) {
|
if (normalizedMimeType === mime_types.MIME_TYPE_AUTO) {
|
||||||
|
await ensureMimeTypesForHighlighting();
|
||||||
highlightedText = highlightAuto(text);
|
highlightedText = highlightAuto(text);
|
||||||
} else if (normalizedMimeType) {
|
} else if (normalizedMimeType) {
|
||||||
await ensureMimeTypesForHighlighting();
|
await ensureMimeTypesForHighlighting();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user