Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
skyronic merged 9 commits intovuejs:st4fromdeathaxe:st4
Sep 9, 2021
Merged

Fix compatibility issue with ST4114+#215

skyronic merged 9 commits intovuejs:st4fromdeathaxe:st4
Sep 9, 2021

Conversation

@deathaxe
Copy link

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:

  1. Thestyle-close-tag was probably not needed, as it hasn't changed, but it is copied to maintain formal consistency with script tags.
  2. This PR exists to as help was asked for inFix compatibility with new ST4 versions #214.

rchl reacted with hooray emoji
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
Copy link
Collaborator

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
Copy link

rchl commentedSep 8, 2021
edited
Loading

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
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Collaborator

@skyronic isn't there some blocking issue that makes some testing impossible?

@rchl - yes, there was indeed an issue I encountered while testing it. Something like

<style lang="sass">@import '~foo'// ^ source.sassa  color: red</style>

Would not work, because even though the// would be recognized as a comment, Syntax Tests needed to be wrapped inside a<!-- -->

I'm still not 100% sure how@deathaxe's tests work but it appears to be using HTML comment start/end punctuation in<script> and<style> tags. I would need to take a closer look.

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
Copy link
Author

Would not work, because even though the // would be recognized as a comment, Syntax Tests needed to be wrapped inside a<!-- -->

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##. I've just choosen// because it seems more common.

@deathaxe
Copy link
Author

I found some bug in template tag handling, I am not sure about the waymustache-expression is implemented and would suggest to reorganize the syntax a bit to group contexts which belong together and sort those groups to match the order of core HTML.sublime-syntax.

All of that could happen soon, but feels out of scope for this PR.

I'd open new ones for the mentioned fixes.

Copy link

@rchlrchl left a 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.

Syntax test runner fails due to missing embedded syntax packages.This is an issue for another PR.
@deathaxe
Copy link
Author

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
Copy link
Author

This PR contains all fixes required to run with all ST4 releases. I wouldn't want to add more stuff in here.

@skyronic
Copy link
Collaborator

Looks good to me, tested it and works great! Will submit to package control today!

Thanks again,@deathaxe@rchl

@skyronicskyronic merged commite9a899c intovuejs:st4Sep 9, 2021
@deathaxedeathaxe deleted the st4 branchSeptember 9, 2021 15:34
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@skyronicskyronicskyronic left review comments

+1 more reviewer

@rchlrchlrchl left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@deathaxe@skyronic@rchl

[8]ページ先頭

©2009-2025 Movatter.jp