Raw string coloring buggy
See original GitHub issueHi, the way how the syntax coloring of raw strings work is not correct. If you look at the reference you will see that there is a flexible amount of # delimiters that can be used. E.g. let foo = r##" "# "##;
is a valid raw string. To correct the current Textmate grammar, you can replace the current rust_raw_string
rule with this one:
<key>rust_raw_string</key>
<dict>
<key>begin</key>
<string>r(#*)"</string>
<key>end</key>
<string>"(\1)</string>
<key>name</key>
<string>string.quoted.other.raw.rust</string>
</dict>
It seems the rule also has to be move above the rust_string
rule to have higher precedence. I don’t know where you got the grammar from and if you want yours to diverge from the original. If not this issue maybe should be opened for the originating project.
EDIT: The rust_raw_string
rule already is above rust_string
, I guess I played around too much with the grammar, before landing on a version that worked.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
What exactly is a "raw string regex" and how can you use it?
The solution is to use Python's raw string notation for regular expression patterns; backslashes are not handled in any special way in a...
Read more >C++ Weekly - Ep 183 - Start Using Raw String Literals
Important conference, book and swag info in description ☟☟T-SHIRTS AVAILABLE!▻ The best C++ T-Shirts anywhere!
Read more >C++11 Feature Proposal: Raw string literals - Google Groups
Raw string literals should continue to be disallowed for now because of buggy support in VC++ 2013. I have tried using them and...
Read more >Raw string literals - Regex Tester/Debugger
^abc$, start / end of the string. \b, word boundary. Escaped characters. \. \* \\, escaped special characters. \t \n \r, tab, linefeed,...
Read more >After implementing xcolor, simple table becomes buggy - TeX
When I am making a table with colored first raw using xcolor for my thesis, vertical line in first raw behaves differently in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep, I can prepare a PR this evening.
Sure I could start a PR, for now. I know in VS Code the grammar seems to do the right thing with regard to raw strings. I think they have their grammar from another Repo as well. I can investigate where their grammar is originally from. If this grammar has more recent updates this could be a better overall alternative. I’ll let you know.