-
Hello everyone I am currently migrating our CMS from Drupal to Hugo. One step in the automation is the conversion from HTML to asciidoc. I tried to use pandoc for this. But unfortunately pandoc does it "wrong": echo ' <a href="https://www.example.com" target="_blank" title="Example title">Example ' | pandoc --wrap=none -f html -t asciidocThe result is the following: [https://www.example.comExample] I would have hoped for something like this: [https://www.example.comExample^] 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! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Your message is really hard to follow. Use code blocks to wrap commands and output that might get messed up by Markdown used here on GitHub. I just checked my Pandoc version and get the same output: $ echo '<a href="https://www.example.com" target="_blank" title="Example title">Example</a>' | pandoc --wrap=none -f html -t asciidoc
https://www.example.com[Example]
$ pandoc --version
pandoc 3.3
$ pandoc --list-extensions=asciidoc
-ascii_identifiers
+auto_identifiers
-east_asian_line_breaks
-gfm_auto_identifiers Docs of AsciiDoc link attributes: https://docs.asciidoctor.org/asciidoc/latest/macros/link-macro-attribute-parsing/ I assume there will be a way to write a Lua filter to process the links and output the raw AsciiDoc the way you want it, but I don't have the time to work it up. I'm a bit surprised it doesn't work out of the box already! That can probably be a bug report, the |
Beta Was this translation helpful? Give feedback.
-
Here's what I'm seeing (latest pandoc):
Or if you leave out the closing
Maybe this is what you got too, and it's just a problem with how your original message is formatted? IN any case, if your request is to have the title attribute represented in the asciidoc output, then by all means, please submit an issue on this and we can improve it. |
Beta Was this translation helpful? Give feedback.
Your message is really hard to follow. Use code blocks to wrap commands and output that might get messed up by Markdown used here on GitHub.
I just checked my Pandoc version and get the same output:
Docs of AsciiDoc link attributes:
https://docs.asciidoctor.org/asciidoc/latest/macros/link-macro-attribute-parsing/
I assume there will be a way to write a Lua filter to process the …