Open shinguz opened 1 month ago
This user is having trouble copy pasting HTML and AsciiDoc into GitHub's markdown with no escaping. This issue is supposed to be a feature request for title attributes to carry over to the AsciiDoc writer. My comment in #10084 has links to the docs for that.
OK. So, here is present behavior:
% pandoc -f html -t asciidoc
<p><a href="https://www.example.com" target="_blank" title="Example title">Example</a></p>
^D
https://www.example.com[Example]
Reproducing the link here: https://docs.asciidoctor.org/asciidoc/latest/macros/link-macro-attribute-parsing/
I think these are features that were added to asciidoc more recently. Actually, you can see that it's quite complex; we must also give special handling to any case where the link text contains a comma or equal sign!
So, we need to do two things:
Discussed in https://github.com/jgm/pandoc/discussions/10084
Example
' | pandoc --wrap=none -f html -t asciidoc ``` The result is the following: ``` [https://www.example.com[](https://www.example.com/)Example] ``` I would have hoped for something like this: ``` [https://www.example.com[](https://www.example.com/)Example^] [https://www.example.com[](https://www.example.com/)Example, title="Example title", window="blank"] ``` I don't feel like fixing the 100s of links by hand. Is it possible to adjust this in pandoc (configuration, plug-in) or is it not yet implemented (or a bug)? Or do I have a too old version (v2.9.2.1)? Do any of you know more about this? I haven't found anything quickly, but I don't know exactly where to look... Many thanks to you all for a hint!