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 exclamation comment #15

Closed
wants to merge 1 commit into from
Closed

Conversation

linktohack
Copy link

In a simpler manner

The previous one fails in this case:
!-------------------
!I'm a good comment
!-------------------
function good(a, b)

  • The second comment line is not treated as comment, even worse, the
    apostrophe (') marks the rest as a string.
  • The 4th line is not treated as a function even if there is no
    apostrophe.

In a simpler manner

The previous one fails in this case:
!-------------------
!I'm a good comment
!-------------------
function good(a, b)

- The second comment line is not treated as comment, even worse, the
  apostrophe (') marks the rest as a string.

- The 4th line is not treated as a function even if there is no
  apostrophe.
@infininight
Copy link
Member

What application and version are you seeing this problem with? The master branch is designed to work with TextMate 2.0 which I am not seeing the error described with. There is a 1.x branch for 1.x and other applications that haven't been updated yet.

@linktohack
Copy link
Author

This happened to both Sublime Text 2 & 3.

Can you explains what's improved here, @infininight? 1f44892

-L

@infininight
Copy link
Member

The new rule scopes the whitespace leading into a comment (if any) separately from the comment, this means certain snippets continue to work before the comment, etc. This fails in Sublime Text because it doesn't recognize the \G assertion used in the end rule of the first begin/end.

The same change was made to all of the TextMate bundles because in a lot of them we scoped comments as a single match which didn't allow injections to work inside of comments. (Not a worry in Sublime Text as it also doesn't support injections as far as I know.)

@linktohack
Copy link
Author

Thank you, @infininight, I got the idea, I will think of a universal way to work with them both.

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