lib/asciidoctor/syntax_highlighter/pygments.rb in asciidoctor-2.0.13 vs lib/asciidoctor/syntax_highlighter/pygments.rb in asciidoctor-2.0.14

- old
+ new

@@ -31,16 +31,16 @@ if (highlighted = lexer.highlight source, options: highlight_opts) highlighted = highlighted.sub StyledLinenoColumnStartTagsRx, LinenoColumnStartTagsCs if noclasses highlighted = highlighted.sub WrapperTagRx, PreTagCs opts[:callouts] ? [highlighted, (idx = highlighted.index CodeCellStartTagCs) ? idx + CodeCellStartTagCs.length : nil] : highlighted else - node.sub_specialchars source # handles nil response from ::Pygments::Lexer#highlight + node.sub_source source, false # handles nil response from ::Pygments::Lexer#highlight end elsif (highlighted = lexer.highlight source, options: highlight_opts) highlighted = highlighted.gsub StyledLinenoSpanTagRx, LinenoSpanTagCs if linenos && noclasses highlighted.sub WrapperTagRx, '\1' else - node.sub_specialchars source # handles nil response from ::Pygments::Lexer#highlight + node.sub_source source, false # handles nil response from ::Pygments::Lexer#highlight end end def format node, lang, opts if opts[:css_mode] != :class && (@style = (style = opts[:style]) && (style_available? style) || DEFAULT_STYLE) &&