Skip to content

Commit

Permalink
fix inject-head js not working
Browse files Browse the repository at this point in the history
  • Loading branch information
guanglinn committed Aug 2, 2024
1 parent ca79c62 commit 825477c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ public String convertMarkup(String markup, Context context, boolean lightMode, b
// Enable View (block) code syntax highlighting
if (markup.contains("```")) {
head += getViewHlPrismIncludes(GsContextUtils.instance.isDarkModeEnabled(context) ? "-tomorrow" : "", enableLineNumbers);
if (_appSettings.getDocumentWrapState(file.getAbsolutePath())) {
onLoadJs += "wrapCodeBlockWords();";
}
}

// Enable Mermaid
Expand Down Expand Up @@ -337,10 +340,6 @@ public String convertMarkup(String markup, Context context, boolean lightMode, b
}
}

if (_appSettings.getDocumentWrapState(file.getAbsolutePath())) {
onLoadJs += "wrapCodeBlockWords();";
}

if (enableLineNumbers) {
// For Prism line numbers plugin
onLoadJs += "enableLineNumbers(); adjustLineNumbers();";
Expand Down

0 comments on commit 825477c

Please sign in to comment.