baranovskypd / goodpress

WIP!! :warning: R Package to Write Posts from R Markdown to Wordpress :warning:
https://maelle.github.io/goodpress/
Other
34 stars 5 forks source link

Stop pandoc_convert() from wrapping code #36

Closed mdingemanse closed 1 year ago

mdingemanse commented 1 year ago

Looks like the pandoc_convert() step in wp_post() wraps code by adding newline characters which upon import in WordPress become <br />. Solution is to add wrap=none to the pandoc option call: options = c("--mathjax","--wrap=none")

maelle commented 1 year ago

For next time, good to know: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

You might enjoy this post once it's published: https://github.com/ropensci/roweb3/pull/531 :grin: