CodeMirror 6 embedded in Xhtml

Hi,

There are some issues when CodeMirror 6 is embedded in Xhtml pages.
Do you want CodeMirror 6 to be compatible with Xhtml or do you reject Xhtml?
If you want to be compatible, I can open issues on github. If not, I will probably try to maintain a fork.

Thanks for your reply

I consider XHTML to be pretty much a legacy technology at this point, and not something the library should support. But if you have a very good reason to still be using XHTML, I’d be interested what it is.

Thank you for your reply.

Html is a permissive syntax which poses many difficulties. In particular, it is very difficult to parse correctly. We develop solutions with a generative approach, where an xhtml page is produced by a series of transformations. An xhtml page can always be post-transformed for a particular customization. We therefore want to have a format that is always parsable to be post-transformed (in environments other than browsers).

Xhtml also has some important flaws, but less so… One day we will perhaps be rid of these old syntaxes full of defects, and a new syntax will emerge like generic-syntax.

Generator can generate perfectly formatted html too. I don’t see valid reason to stay with the outdated xhtml format.

If you don’t use html5, latest browser might use some quirk / legacy mode to render xhtml which could give you some headache.

Thanks for your feedback. We are well aware of the potential problems you are talking about, but we still prefer to keep using XHTML as long as we can because we believe it is better.

For those who are interested, here are the few hacks to be xhtml compatible :

Note: if you want also manage html tags in uppercases, the hacks should be of the form xhtml ? node.localName==="li" : node.nodeName==="LI" with xhtml a boolean static field correctly initialized.