josemarluedke / remark-hbs

Remark plugin that allows writing markdown with Ember handlebars templates
MIT License
6 stars 2 forks source link

Multiline arguments result in a compilation error #17

Open NullVoxPopuli opened 3 years ago

NullVoxPopuli commented 3 years ago

Reproduction on limber.glimdown.com


<Foo></Foo> <-- Works

<hr>

<Foo 
>
</Foo>
^ The greater than is turned in to a blockquote 
   and the opening angle bracket of Foo is converted to an HTML Entity.

For really long arg lists, it is unideal to inline them. :upside_down_face:

josemarluedke commented 3 years ago

This is a known limitation due to markdown syntax. It's mentioned in the readme: https://github.com/josemarluedke/remark-hbs#limitations

I do think we can work around it by doing more regex stuff.

I do wonder if we should start thinking about extending remark's micromark compiler/tokenizer, similar to how MDX is built.

NullVoxPopuli commented 3 years ago

I do wonder if we should start thinking about extending remark's micromark compiler/tokenizer, similar to how MDX is built.

potentially -- I don't know if regex will be as robust as we want it to be long term? idk

I do think finding a solution is essential for DX tho

NullVoxPopuli commented 3 years ago

This may be solveable with a remark config, as this affects HTML as well: https://github.com/remarkjs/remark/discussions/676