Hello friends
I’m wanting to make a pattern end without capturing (I think that’s the correct word) the end value.
In my case, here is my file:
@yaml
yaml here
@python
python here
I wish to have a yaml-formatted block in the beginning of an @yaml, then end when another @something is found. But the only way I know results in the @something not being captured as another start, which it should be. Here is my current grammar patterns:
patterns: [
{
begin: '^@yaml'
end: '@'
patterns: [{ include: 'source.yaml' }]
}
{
begin: '^@python'
end: '^@+.(\n|\r)'
patterns: [{ include: 'source.python' }]
}
]
Any thoughts? Is this possible?