Rapporter / pander

An R Pandoc Writer: Convert arbitrary R objects into markdown

Home Page:http://rapporter.github.io/pander/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preserve src formatting in evals

seanbirchall opened this issue · comments

I've made a small R repl app which heavily uses pander evals. I'm wondering if there is anyway to preserve the src formatting of txt, right now it removes all \n.

In the below screenshot I'm using shinyAce which returns a character string formatted as it appears in the editor, I then pass all code run in shinyAce to evals, below the editor is non-interactive console where you can see I return evals[[x]][["src"]] which removes the formatting.

evals

Did you check if the parse argument of evals helps in your use case?

I did but the wording of it made me believe it wouldn't give me the results I'm looking for... I was wrong. parse = FALSE does exactly what I want, thank you @daroczig.

awesome, thanks for reporting back

oh, and feel free to create a PR to improve the wording of that param .. it was written ~10 yrs ago with my limited English skills 🤐