parseMixed javascript or into html inside parsedMixed off by (something)

Hello !

I’m using the html language support to highlight julia strings as below.
HTML gets formatted impeccably, but the CSS and JS are broken, in what seems to be an wrong offset of the highlights

A M(not)WE is here,

break with

@htl("""<script>
let x = 5;console.log("61")
</script>
""")

The imports are done from a bundle that mimics basic-setup but supercharged, for Pluto.jl: https://github.com/JuliaPluto/codemirror-pluto-setup/tree/pg/test

My 2c are that there is this line needs an overlay? https://github.com/lezer-parser/html/blob/main/src/content.js#L18 but to be honest I’m a bit lost.

Any pointers would be super-appreciated.

Thanks!
Panayiotis

This was a bug in parseMixed, which caused the second level of nesting to be treated as if its tree started at 0. @lezer/common 0.15.7 should fix it.

2 Likes

it does! Thank you!

We’re doing some magic with it!