videlais / snowman

An advanced Twine 2 story format designed for people who already know JavaScript and CSS
MIT License
128 stars 35 forks source link

HTML shorthands breaking custom elements #834

Open MalifaciousGames opened 4 months ago

MalifaciousGames commented 4 months ago

Hi, it seems the - shorthand for hidden elements messes with the parsing of custom elements, making them impossible to use : <custom-elem></custom-elem> renders as <custom style="display:none"></custom>.

I would gladly submit a pull request but I've been struggling to find when this parsing actually occurs in the rendering process.

videlais commented 1 month ago

@MalifaciousGames I'm not surprised to learn that. I incorporated some older ideas into Snowman 2 and these have led to a number of problems. If you really want to work on this issue, it is part of the 2.X branch (https://github.com/videlais/snowman/blob/2.X/lib/Passage.js#L75).