Closed ghost closed 5 years ago
Thank you for posting this, I have been experiencing the same issue with unintended line breaks
@axme100 Are you also seeing the double YAML header? Also, are you using Linux, OSX, or Windows?
I'm not seeing the double YAML header, just the extra line breaks, also I'm on OSX. I can put reproducible example tomorrow if that helps
@axme100 Please do, and file that as a separate issue? I suspect the issue @uweremerbollow is seeing has to do with conversion between Windows and Unix style line breaks.
@uweremerbollow, I don't have a Windows machine at the moment to do debugging on, so this may be a bit slow, but I've pushed a branch with an attempted fix. Please install it like so and let me know how and if the behavior changes:
remotes::install_github("noamross/redoc@windows-linebreaks")
Thank you @noamross, the fix solved the issue! Thanks for the really fast response!
Great! This change is now merged into the master branch.
Problem
When I render and update the rmd-file (or knit and dedoc), additional unintended linebreaks are inserted and the yaml header is inserted a second time. In the first rendered docx, the lines stay together as a paragraph. But subsequent renders of the updated rmd of course inserts the linebreaks in the docx as well.
Files attached
The attached redoc_reprex.txt contains the initial rmd file (please rename to .rmd, github didn'support .rmd upload within this form), the redoc_reprex_after_render_and_update.txt the malformatted file after render and update. redoc_reprex.docx contains the result of the initial rendering.
Word Version, sessionInfo and Pandoc
MS Word 2016 (16.0.4849.1000) 64bit
R rmarkdown::pandoc_version()
[1] ‘2.7.2’R sessionInfo()
version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17763)Matrix products: default
locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252 [4] LC_NUMERIC=C LC_TIME=German_Germany.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] Rcpp_1.0.1 rstudioapi_0.9.0 knitr_1.23 xml2_1.2.0 magrittr_1.5 uuid_0.1-2
[7] R6_2.4.0 rlang_0.3.4 stringr_1.4.0 httr_1.4.0 tools_3.5.2 packrat_0.5.0-5
[13] xfun_0.7 sessioninfo_1.1.1 cli_1.1.0 withr_2.1.2 htmltools_0.3.6 assertthat_0.2.1
[19] yaml_2.2.0 digest_0.6.19 crayon_1.3.4 zip_2.0.2 whoami_1.3.0 officer_0.3.4
[25] base64enc_0.1-3 evaluate_0.13 mime_0.6 rmarkdown_1.12 stringi_1.4.3 compiler_3.5.2
[31] diffobj_0.2.2.9003 redoc_0.1.0.9000 jsonlite_1.6