rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

The last line of INI cannot be comments #2012

Open UlyssesZh opened 7 months ago

UlyssesZh commented 7 months ago

Name of the lexer INI

Code sample

HELLO=world
; comments

Rendered result:

<span class="py">HELLO</span><span class="p">=</span><span class="s">world</span>
<span class="err">;</span> <span class="err">comments</span>

Expected (may be produced by appending a newline at the end of the code sample above):

<span class="py">HELLO</span><span class="p">=</span><span class="s">world</span>
<span class="c">; comments</span>

Additional context There seems to be no universal standards for INI, but comments in the last line should be a stable enough feature of INI.