egoist / markdown-it-highlight-lines

Highlight specific lines in code blocks.
MIT License
88 stars 11 forks source link

don't wrap code if already wrapped with <pre... by highlight fn #3

Closed maximilianschmitt closed 6 years ago

maximilianschmitt commented 6 years ago

See https://github.com/markdown-it/markdown-it#init-with-presets-and-options:

  // Highlighter function. Should return escaped HTML,
  // or '' if the source string is not changed and should be escaped externally.
  // If result starts with <pre... internal wrapper is skipped.
  highlight: function (/*str, lang*/) { return ''; }