Browse Source

feat: added `env` argument to `highlight` option

pull/1119/head
SerKo 8 months ago
parent
commit
68076696b4
  1. 2
      lib/renderer.mjs

2
lib/renderer.mjs

@ -40,7 +40,7 @@ default_rules.fence = function (tokens, idx, options, env, slf) {
let highlighted
if (options.highlight) {
highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content)
highlighted = options.highlight(token.content, langName, langAttrs, env) || escapeHtml(token.content)
} else {
highlighted = escapeHtml(token.content)
}

Loading…
Cancel
Save