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

Allowed multiline CriticMarkup #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

teoric
Copy link

@teoric teoric commented Jan 12, 2017

The CriticMarkup documentation states that
linebreaks should be avoided, but seems to permit them; also the parser seems to process them well. (In my opinion, the part on inline elements probably refers to avoiding paragraph breaks, or something causing the insertion of line breaking HTML elements.)

For people who are willing to take the risk, it would be nice to highlight multiline CriticMarkup, which is what these changes do.

The CriticMarkup documentation
[states](https://github.com/CriticMarkup/CriticMarkup-toolkit) that
linebreaks should be avoided, but seems to permit them; also the parser
seems to process them well.  (In my opinion, the part on inline
elements probably refers to avoiding paragraph breaks, or something
causing the insertion of line breaking HTML elements.)

For people who are willing to take the risk, it would be nice to
highlight multiline CriticMarkup, which is what these changes do.
@teoric
Copy link
Author

teoric commented Jan 12, 2017

On second thought: Do you think it would be preferable to make sure it's only one \n at a time? That would avoid paragraph breaks. (To guard against line break markers would mean to avoid \n, I think, which may be overkill?)

@joostkremers
Copy link
Owner

The Elisp docs specifically state that "elements of font-lock-keywords should not match across multiple lines", so adding [:space:] to the regexes probably isn't a good idea.

I'll look into the right way of doing multi-line font lock.

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

Successfully merging this pull request may close these issues.

2 participants