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

- old
+ new

@@ -131,13 +131,13 @@ extend Styles # exports static methods include Loader, Styles # adds methods to instance CodeCellStartTagCs = '<td class="code">' LinenoColumnStartTagsCs = '<td class="linenos"><div class="linenodiv"><pre>' - LinenoSpanTagCs = '<span class="lineno">\1</span>' + LinenoSpanTagCs = '<span class="lineno">\1 </span>' PreTagCs = '<pre>\1</pre>' StyledLinenoColumnStartTagsRx = /<td><div class="linenodiv" style="[^"]+?"><pre style="[^"]+?">/ - StyledLinenoSpanTagRx = %r(<span style="background-color: #f0f0f0; padding: 0 5px 0 5px">( *\d+ )</span>) + StyledLinenoSpanTagRx = %r((?<=^|<span></span>)<span style="[^"]+">( *\d+) ?</span>) WRAPPER_CLASS = 'lineno' # doesn't appear in output; Pygments appends "table" to this value to make nested table class # NOTE <pre> has style attribute when pygments-css=style # NOTE <div> has trailing newline when pygments-linenums-mode=table # NOTE initial <span></span> preserves leading blank lines WrapperTagRx = %r(<div class="#{WRAPPER_CLASS}"><pre\b[^>]*?>(.*)</pre></div>\n*)m