tree-sitter / tree-sitter-html

HTML grammar for Tree-sitter
MIT License
136 stars 72 forks source link

Parser fails in `web-tree-sitter` on certain unusual input #55

Closed savetheclocktower closed 1 year ago

savetheclocktower commented 1 year ago

I discovered this one when pasting a svelte file into a buffer that used an HTML grammar, but you can reproduce it on the official playground: choose HTML in the drop-down, then paste

<svelte:head>

into the Code box. Check the console for the error — it's the tell-tale symptom of tree-sitter#949.

I can fix it by adding

  "__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE25__init_copy_ctor_externalEPKcm",

to lib/binding_web/exports.json and building my own version of web-tree-sitter, but ultimately this is a symptom of an individual grammar not being able to define its own exports.json.