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

fix(http) avoid recursive sublanguage and tighten rules #2893

Merged
merged 7 commits into from
Dec 11, 2020

Conversation

joshgoebel
Copy link
Member

Currently it's too easy to trigger recursive sublanguages with
a file that contains multiple paragraph breaks (\n\n). http
can potentially fire over and over resulting in auto-detect on
the remaining content with all grammars over and over.

This tightens up the HTTP rules a lot to avoid this recursion
as well as reduce a lot of false positives.

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md
  • Added myself to AUTHORS.txt, under Contributors

Copy link
Member

@allejo allejo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<span class="hljs-attribute">Host</span><span class="hljs-punctuation">: </span>example.org

It feels kinda weird to me that the space is considered part of the "punctuation."

but this looks good 👍

@joshgoebel
Copy link
Member Author

joshgoebel commented Dec 11, 2020

It feels kinda weird to me that the space is considered part of the "punctuation."

I no longer spend extra effort on inline spacing issues IF they would be difficult to solve.

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