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

Markdown syntax test failure investigation #62

Closed
keith-hall opened this issue Apr 5, 2017 · 3 comments
Closed

Markdown syntax test failure investigation #62

keith-hall opened this issue Apr 5, 2017 · 3 comments

Comments

@keith-hall
Copy link
Collaborator

keith-hall commented Apr 5, 2017

Although the Markdown syntax tests pass on Sublime Text build 3126, it is currently failing in syntect because syntect doesn't suffer from this bug: sublimehq/sublime_text#1190

Therefore, in syntect, https://github.com/trishume/Packages/blob/537d1bfa5bc205aa461b12eb3c996935e017e575/Markdown/Markdown.sublime-syntax#L758 is popping immediately after the push. As it is not a bug in syntect, and the aforementioned bug will be fixed in the next ST build, it can definitely be considered a bug in the syntax definition, which will need a tweak to continue working as expected.

The test line in question is:

- `code` - <a name="demo"></a>
|          ^^^^^^^^^^^^^^^^^^^ meta.tag.inline.a.html
keith-hall added a commit to forkeith/Packages that referenced this issue Apr 5, 2017
@trishume
Copy link
Owner

trishume commented Apr 5, 2017

Interesting. I remember running into the problem where Sublime would avoid following infinite push/pop cycles. I implemented that I think by keeping track of a set of contexts already attempted at a position, but it seems Sublime just implemented it by saying "if you push and then pop at the same position, it must be a cycle".

@keith-hall
Copy link
Collaborator Author

Yeah ST's method was lazy ;) no idea what their new implementation will be though.

Anyway, my PR to the ST Default Packages repo with a fix for this has been merged, so we could choose to update https://github.com/trishume/Packages also :)
(There have also been a number of recent improvements to the Rust syntax definition, from what I can see.)

@keith-hall
Copy link
Collaborator Author

This is now passing all tests:

Testing file testdata/Packages/Markdown/syntax_test_markdown.md
The test file references syntax definition file: Packages/Markdown/Markdown.sublime-syntax
Ok(Success(5119))
Testing file testdata/Packages/Markdown/syntax_test_multimarkdown.md
The test file references syntax definition file: Packages/Markdown/MultiMarkdown.sublime-syntax
Ok(Success(120))

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