Skip to content
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

Syntax Highlighting and Preview problems with escaped Underscore and Asterisk characters. #98

Open
MatthewRaymond opened this issue Apr 22, 2020 · 1 comment

Comments

@MatthewRaymond
Copy link

When using a backslash to escape an asterisk or underscore character ("*", "_"), the syntax highlighting ignores the backslash and processes the asterisk or underscore as the beginning their respective forms of emphasis. It also continues the italics or underline highlighting until it hits a second asterisk or underscore, which is incorrect. Emphasis like bold, italics and underline is not supposed to cross line breaks. A single asterisk or underscore on a line should be treated as that character, not a form of emphasis that continues until a second asterisk or underscore is found. The preview properly handles escaped underscores and asterisks correctly, but it doesn't properly handle the situation with a single asterisk or underscore on a line.

@superlou
Copy link
Owner

With respect to the preview, there's not much we can do since that's generated by Afterwriting, though we could open an issue in their project.

I confirmed that the grammar definitely isn't highlighting strictly per the Fountain emphasis rules. Unfortunately, the regex in there is a big mess. I'm going to look at untangling it, but it's unlikely to strictly conform to all of markdown. Are the examples on the Fountain documentation realistic ones that are causing you issues?

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

No branches or pull requests

2 participants