Skip to content

Fix custom demos#2218

Merged
tancnle merged 1 commit intomasterfrom
bugfix.custom-demo
Feb 24, 2026
Merged

Fix custom demos#2218
tancnle merged 1 commit intomasterfrom
bugfix.custom-demo

Conversation

@jneen
Copy link
Copy Markdown
Member

@jneen jneen commented Feb 20, 2026

In working on the new Rouge plugin example codebase, I discovered that demo handling has been broken for some time, on account of a missed ||=. This should work, but is broken on master:

class MyCoolLexer < Rouge::RegexLexer
  demo <<~MY_DEMO
    here is my demo text
  MY_DEMO
end

This will try to load a file from the Rouge install location itself, ignoring the directive in the class.

@jneen jneen requested a review from tancnle February 20, 2026 19:50
@tancnle
Copy link
Copy Markdown
Collaborator

tancnle commented Feb 24, 2026

Thanks, @jneen. LGTM 🚀

@tancnle tancnle added this pull request to the merge queue Feb 24, 2026
Merged via the queue into master with commit 7d1bf7f Feb 24, 2026
10 checks passed
@tancnle tancnle deleted the bugfix.custom-demo branch February 24, 2026 10:46
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