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

Tcl lexer doesn't respect comments #2039

Closed verhovsky closed 2 months ago

verhovsky commented 3 months ago

Name of the lexer Tcl

Code sample A sample of the code that produces the bug.

# The braced form of variable substitution handles more complex variable names:
set greeting "Hello, ${first name}"

# "set" can always be used instead of variable substitution, and can handle all
# variable names:
set greeting "Hello, [set {first name}]"

# To unpack a list into the command, use the expansion operator, "{*}".  These
# two commands are equivalent:
set name Neo
set {*}{name Neo}

The "set" in the comment is highlighted

https://rouge.jneen.net/v4.2.1/tcl/IyBUaGUgYnJhY2VkIGZvcm0gb2YgdmFyaWFibGUgc3Vic3RpdHV0aW9uIGhhbmRsZXMgbW9yZSBjb21wbGV4IHZhcmlhYmxlIG5hbWVzOgpzZXQgZ3JlZXRpbmcgIkhlbGxvLCAke2ZpcnN0IG5hbWV9IgoKIyAic2V0IiBjYW4gYWx3YXlzIGJlIHVzZWQgaW5zdGVhZCBvZiB2YXJpYWJsZSBzdWJzdGl0dXRpb24sIGFuZCBjYW4gaGFuZGxlIGFsbAojIHZhcmlhYmxlIG5hbWVzOgpzZXQgZ3JlZXRpbmcgIkhlbGxvLCBbc2V0IHtmaXJzdCBuYW1lfV0iCgoKIyBUbyB1bnBhY2sgYSBsaXN0IGludG8gdGhlIGNvbW1hbmQsIHVzZSB0aGUgZXhwYW5zaW9uIG9wZXJhdG9yLCAieyp9Ii4gIFRoZXNlCiMgdHdvIGNvbW1hbmRzIGFyZSBlcXVpdmFsZW50OgpzZXQgbmFtZSBOZW8Kc2V0IHsqfXtuYW1lIE5lb30K

https://learnxinyminutes.com/docs/tcl/ (uses rouge 3.30.0)