-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Swift) Incorrect highlighting of raw strings #2819
Comments
And we have a winner - seems not to be. :-) Want to work on a PR? :-) |
I have a commit ready on https://github.com/svanimpe/highlight.js. W.r.t. testing: I can sort of guess how the test cases work. Can I just add new files to test/markup/swift, or do I have to register them somewhere? And how do I run tests to verify that they work? (I'm not a JavaScript developer). |
Yes, you may want to consider renaming
|
Note: The PR in #2820 is not a bad start. |
To make it even more complex, escapes (such as So |
Annoying, but doable if we're only supporting a few specific variants... vs any number of ##### - which may not actually be possible given the contextual constraints you just mentioned. |
Just FYI: I'm picking this up again. Expect a pull request soon! |
[Editor: Dropping some notes for whoever picks this up]
This needs to also take into account:
The following is a single raw string:
##"Use #" and "# to delimit a raw string."##
However, it's incorrectly highlighted as two separate strings. My guess is that highlight.js thinks the quotes in the middle close a string, then start a new one?
In general, the hashes around raw strings aren't highlighted in the same color as the string, so perhaps raw strings aren't supported at all yet?
The text was updated successfully, but these errors were encountered: