Skip to content

Fix # comment for INI without following blank line#2295

Open
hansu wants to merge 1 commit into
rouge-ruby:mainfrom
hansu:fix-ini-comment
Open

Fix # comment for INI without following blank line#2295
hansu wants to merge 1 commit into
rouge-ruby:mainfrom
hansu:fix-ini-comment

Conversation

@hansu

@hansu hansu commented May 29, 2026

Copy link
Copy Markdown

A comment started with '#' was not rendered as a comment when that comment wasn't followed by an empty line.

Showing as an example in asciidoctor syntax
So this does not render correctly:

[source,ini]
----
# a comment
----

But with a trailing blank line it renders correctly:

[source,ini]
----
# a comment

----

This fix make also the above example render correctly.
It also allows leading whitespaces for # comments.

A comment started with '#' was not rendered as a comment when that comment wasn't followed by  an empty line.
Also allow leading whitespaces for that comment.
@jneen

jneen commented Jun 11, 2026

Copy link
Copy Markdown
Member

I think this could be fixed more simply just by using /[#;].*?$/, or even more simply /[#;].*/. Would you also be willing to add this example to spec/visual/samples/ini?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants