Open feliksik opened 1 month ago
The thing is that asciidoctor produces broken xml. It is just html rendering engine that forgives such issues:
One of the option that I can applly here - use Jsoup (already in deps) to auto-fix html document, it has such a feature. Do you think it will make sense?
JSoup normalizes it like this: <p>This is a <code><strong></strong></code><strong> weird <code></code></strong> bold thing.</p>
That a great point @zeldigas , I didn't realize this. I report this as asciidoctor bug upstream, but it will not be fixed.
I'm not sure what's wise here to be honest. There are few options:
I think (if it's easy) that solution 3 may make sense.
I don't consider this high-prio, but it might prevent some frustrations for the user.
Such issue can happen with markdown too. I think auto-fix can be handled for every page and controlled via some configuration option/cli flag. It will be off by default, but opted in if you prefer some result over page correctness
The following asciidoc makes text2confl fail:
Output:
Some pages content is invalid:
Admittedly, it's weird stuff, I actually intended to show monospace asterisks; but the asciidoc html output is ok, so ideally text2confl would not choke.