Hi,
i’m developing a syntax highlighting for jstl and i’m rewriting html syntax for implementig it with nested tags and more visual effects.
I’m blocked with this part of regex that broke the syntax:
- include: '#tag-stuff'
- contentName: source.js.embedded.html
begin: (?<!</(?:[sS][cC][rR][iI][pP][tT]))(>)
end: (</)((?i:script))
this part of code brokes the regex when i have this particular case:
<script type="text/javascript">
<c:set var="" value=""></c:set>
</script>
the particular case that brokes is this </
char combination
how i can rewrite the regex to bypass this problem?
there the complete code:
jstl YAML file
interested line are from 92 to 118, if i remove them it works correctly but i lose javascript support…
EDIT 1:
ended code from suggestions:
- name: meta.tag.script.html
begin: (?<=(<)([sS][cC][rR][iI][pP][tT]))([^\/].+?)(>)
end: (<\/)([sS][cC][rR][iI][pP][tT])()(>)
captures:
'1': {name: punctuation.definition.tag.begin.html}
'2': {name: punctuation.definition.tag.html}
'4': {name: punctuation.definition.tag.end.html}
patterns:
- include: '#tag-stuff'
- contentName: source.js.embedded.html
match: (?<=(>))([\S\s]*)(?=(<\/))
patterns:
- include: source.js
now the last thing with this code is to understand because it don’t load the javascript source.js syntax…