-
Notifications
You must be signed in to change notification settings - Fork 11
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
Make the syntax work with Syntect; support Cargo.lock and Gopkg.lock TOML files #9
Conversation
@slimsag does this need rebasing? |
f50a73c is definitely a bug in syntect that should be fixed. Usually you want to avoid unnecessary capture groups like these. eceda6d would be easy enough to add manuall/cherry-pick, though you have to wonder what other usages the |
I agree, although my hope is that we would be okay with this workaround for now (until the bug is fixed there, I will file a bug on Syntect)
That is a good point, I tried to find other examples of Will update this PR soon. |
So that the syntax can work with Syntect, otherwise you get: ``` ParseSyntax(RegexCompileError("((?:[ \\t\\n]|$)*)", Error(-114, target of repeat operator is invalid))) ```
PR updated & re-tested, should be good to merge now :) |
@@ -6,12 +6,14 @@ name: TOML | |||
file_extensions: | |||
- toml | |||
- tml | |||
- Cargo.lock | |||
- Gopkg.lock |
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.
(note: in case anyone questions this, other syntaxes also specify full filenames in the file_extensions
section and both Sublime and Syntect support this feature. e.g. see https://github.com/zyxar/Sublime-CMakeLists/blob/ff9a800a4ca942edd095de553ca05fba03b02275/CMake.sublime-syntax#L7)
Great work @slimsag This has been released here: |
This is based on / can be merged after #7 is merged.