Skip to content

Conversation

@0xdf223
Copy link
Contributor

@0xdf223 0xdf223 commented Feb 1, 2026

Summary

  • Guard the comment_regex check in process_line with allow_comments? so that comments=false actually prevents lines starting with # from being lexed as comments
  • Add a test verifying that comments=false with a custom prompt treats #-prefixed lines as output

Fixes #2200

Test plan

  • Existing console_spec.rb tests pass
  • New test confirms ##MS_PolicyEventProcessingLogin## is lexed as Generic.Output (not Comment) when comments=false

Guard the comment_regex check in process_line with allow_comments? so
that setting comments=false actually prevents lines starting with #
from being lexed as comments.
@jneen
Copy link
Member

jneen commented Feb 3, 2026

Good catch, thank you!

@jneen jneen self-requested a review February 4, 2026 01:10
@jneen
Copy link
Member

jneen commented Feb 4, 2026

image

Looking at the console lexer again and we may have some regressions too ><

@0xdf223
Copy link
Contributor Author

0xdf223 commented Feb 10, 2026

Anything you need from me? Can I help in any way?

@jneen jneen added this pull request to the merge queue Feb 10, 2026
Merged via the queue into rouge-ruby:master with commit 305db27 Feb 10, 2026
10 checks passed
@0xdf223 0xdf223 deleted the fix/console-lexer-comments-guard branch February 10, 2026 18:35
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.

ConsoleLexer: comment_regex check not guarded by allow_comments?

2 participants