Is it possible to pass WordPress shortcodes through untouched when converting from markdown to HTML? #10818
-
Hello All, I want to use Pandoc to convert markdown to HTML, and then upload the HTML to my free WordPress.com site. Problem is, WordPress uses shortcodes like: [youtube https://www.youtube.com/watch?v=q_dQfUCywPg] In most cases, just the URL on a line on its own will do: https://www.youtube.com/watch?v=q_dQfUCywPg Apologies if this has been asked before, but is there a way to tell Pandoc to ignore the next line from the input file and pass it through untouched to the output file? Maybe by wrapping it in a specially formatted HTML comment? For example: <!-- shortcode --> Sure, I could do it programmatically, but why bother if Pandoc can do it already? Any suggestions appreciated. Thanks! John |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I'm not familiar with Wordpress shortcodes, but the text
and I run <p>Some text. [youtube https://www.youtube.com/watch?v=q_dQfUCywPg] More
text.</p> Could you elaborate what you are having issues with? |
Beta Was this translation helpful? Give feedback.
-
This syntax will pass it through to HTML unchanged:
|
Beta Was this translation helpful? Give feedback.
-
Hi John,
Thanks, it works perfectly!
And there's an inline variant as well.
Cheers!
John
|
Beta Was this translation helpful? Give feedback.
This syntax will pass it through to HTML unchanged: