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

beginScope and endScope #3159

Merged
merged 4 commits into from May 2, 2021
Merged

Conversation

joshgoebel
Copy link
Member

Resolves #3156.

Changes

Adds endScope and beginScope:

  {
    begin: /"/,
    end: /"/
    beginScope: "string.delim",
    endScope: "string.delim",
    scope: "string"
  }

To produce something like:

<string>
  <string.delim>"</>
    hello world
  <string.delim>"</>
</>

Multi-match may also be used with end, just as with begin.

Checklist

  • Added tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

@joshgoebel joshgoebel requested a review from allejo April 22, 2021 00:37
@joshgoebel joshgoebel added this to the 11.0 alpha 1 milestone Apr 22, 2021
@joshgoebel
Copy link
Member Author

Two commits are probably easier to review separately.

Copy link
Contributor

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this! in certain templating languages dealing with nested stuff is tricky, and this is perfect!

@joshgoebel joshgoebel merged commit 3d64fd9 into highlightjs:main May 2, 2021
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.

[Request] Multi-match for end matchers
3 participants