- Notifications
You must be signed in to change notification settings - Fork227
Fix compatibility issue with ST4114+#215
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Fixes#213This commit applies the required patch of ST4114's HTML.sublime-syntaxin order to fix VUE's incompatibility with most recent ST, whilemaintaining backward compatibility with older builds.The relevant contexts are overridden and variables are copied overfrom HTML.sublime-syntax.Note: The `style-close-tag` was probably not needed, as it hasn't changed, but it is copied to maintain formal consistency with script tags.
skyronic commentedSep 7, 2021
Hey@deathaxe@rchl thank you for taking care of this! I'd like to add some tests for the ST4 branch, I'd started on some early tests for#210 but do you think there are any tests we can add? Let me know if you think this looks good, I can go ahead and make a release where ST4 gets the new branch. I'll test this out myself. To be honest - I haven't had time to look at this in detail - but I'll definitely spend some time on this today. |
rchl commentedSep 8, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
What I can provide is in-the-field testing since I work with Vue files daily. Have been running with this change since yesterday and haven't noticed any issues. @skyronic isn't there some blocking issue that makes some testing impossible? @deathaxe can you provide a small example showing the superiority of this change vs.#214? I would just like to know what it fixes specifically that the other one didn't and test more stuff around that. |
deathaxe commentedSep 8, 2021
Added some tests and a Github Action to run them automatically. They should become active once, this PR is merged. I took the config fromhttps://github.com/SublimeText-Markdown/MarkdownEditing/blob/3.0.0/.github/workflows/ci-syntax-tests.yml |
deathaxe commentedSep 8, 2021
Already found various other improvements, but I'll hold them off until this one is merged. |
This commit adds another fix introduced with ST4114, which addressesthe mentioned meta scopes not being applied correctly. They were missingat attribute assignment operators and closing `>` sign.
This commit applies a structural change from HTML.sublime-syntax, whichturns various "lang" attribute related anonymous contexts into namedcontexts as those help debugging syntax errors when using ST's newscope name popup. They also help inheriting syntaxes more fine grained.
skyronic commentedSep 8, 2021
This is some absolutely stellar stuff,@deathaxe. Thank you!! I tested it locally and it works great! Let me know when you're happy with it, and I'll merge and release. |
skyronic commentedSep 8, 2021
@rchl - yes, there was indeed an issue I encountered while testing it. Something like Would not work, because even though the I'm still not 100% sure how@deathaxe's tests work but it appears to be using HTML comment start/end punctuation in |
The relaxed test cases would fail on <ST4114 as the related fix to avoidduplicated meta scopes was introduced recently.It's basically the same fix as for `lang-attribute` in previous commit,but I don't think we should try to fix all kinds of issues of olderHTML.sublime-syntax.This commit ensures to pass CI syntax tests.
deathaxe commentedSep 8, 2021
The comment character used for syntax tests is defined by the first line of the test file. Your test branch uses those html comments in the first line, which would mean to wrap all test cases in such. That's more than cumbersome. Hence core HTML.sublime-syntax uses |
deathaxe commentedSep 8, 2021
I found some bug in template tag handling, I am not sure about the way All of that could happen soon, but feels out of scope for this PR. I'd open new ones for the mentioned fixes. |
rchl left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Again, I can't provide a proper review but looks good when testing the changes locally.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Syntax test runner fails due to missing embedded syntax packages.This is an issue for another PR.
deathaxe commentedSep 8, 2021
I've removed Github Actions for now as it appears to be more work than expected. It probably fails due to missing embedded syntax packages. Investigating and fixing it is really out of scope here. |
deathaxe commentedSep 8, 2021
This PR contains all fixes required to run with all ST4 releases. I wouldn't want to add more stuff in here. |
Fixes#213
Superseeds#214
This PR applies the required patch of ST4114's HTML.sublime-syntax in order to fix VUE's incompatibility with most recent ST, while maintaining backward compatibility with older builds.
The relevant contexts are overridden and variables are copied over from HTML.sublime-syntax.
Note:
style-close-tagwas probably not needed, as it hasn't changed, but it is copied to maintain formal consistency with script tags.