-
-
Notifications
You must be signed in to change notification settings - Fork 603
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
Don't grey-out literals (characters following a backslash) #44
Comments
Yep, this is a problem in the underlying Markdown parser from Codemirror, which does not differentiate between the escaping backlash and the literal character. It has annoyed me for some time myself. The problem would be that, if I manually alter the Markdown parser code then I won't be able to integrate CodeMirror updates so easily in the future, which is why I'm rather hesitant in doing this. I'll look into the chances of doing so! |
I see that the class But a combination of a regex like:
together with a custom CSS rule for the EDIT: Added |
I see where you get to but this is rather monkey patching-like. I'm not sure that's the best way. In the past months when I was developing Zettlr, I always resorted to monkey-patching. This way I could cramp into the app many features as quickly as possible, and now I'm stuck with a lot of code refactoring. Besides, a simple
As the |
Tada! |
It's fine to grey-out the backslash itself, but the character following it is a literal and therefore is intended to be what it is. For example, if I write
myname\@myuniversity.ac.uk
currently Zettlr greys out both the backslash and the @ sign. Now I realize I probably don't need to write @ as a literal, but pandoc seems to do it anyway when converting from other formats. Maybe a better case is this (sentence entirely fictional):L.P. Hartley wrote that "\[t\]he past is a foreign country; they do things differently \[…\]". You will rightly complain that this quotation is incomplete, but that is my point.
Again, maybe I don't need to put the backslashes in, because it's not interpreted as an href, but pandoc puts them in to avoid ambiguity, and the result is I can hardly see the greyed out brackets in Zettlr, and they're peppered through the work I'm converting.
The text was updated successfully, but these errors were encountered: