-
Notifications
You must be signed in to change notification settings - Fork 31
Description
See this repository for an example.
This shows an import statement with a following callout.
Any space between the end of the import statement is rendered as a red block.
Adding a semicolon at the end of the import statement works around the problem.
The HTML generated by Asciidoctor on my own installation is:
<pre class="highlight"><code class="language-groovy" data-lang="groovy">import x <b class="conum">(1)</b></code></pre>
The HTML generated on GitHub for the line is
<div class="highlight highlight-source-groovy"><pre><span class="pl-k">import</span> <span class="pl-smi">x<span class="pl-ii"> </span>(1)</span></pre></div>
The problem seems to be this:
<span class="pl-ii"> </span>(1)
The pl-ii is a GitHub light CSS style:
.pl-ii /* invalid.illegal */ {
color: #fafbfc;
background-color: #b31d28;
}
So the syntax in my example is considered incorrect.
I added some other formatting possibilities to my example as well.
For example, splitting the import across two statements.
These examples show that the problem happens with a trailing comment on an import line.
One of them suggests that splitting an import over two lines is not well handled either.
I guessed that this file was probably used to do the formatting, and some patterns that look like they would match do include some formatting for illegal characters.
But I wasn't able to pin down exactly what was going wrong.