Georgi Boshnakov
2018-Oct-29 08:57 UTC
[Rd] disappearing paragraphs in html rendering of text from Rd macros
Recent changes in R-devel seem to change the HTML rendering of text returned by Rd macros, in that now empty lines do not cause paragraphs to end (the empty lines are kept but <p> tags are not set). As a result, multiple paragraphs are output as a single one. A complete example Rd file is at: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a.Rd rendered (2018-10-28) with R-devel: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a.html and R-3.5.1patched: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a351.html The exact system information used for rendering is in the above html files. In essence, the following: \newcommand{\abc}{\Sexpr[stage=build,results=rd]{paste0(letters[1:4], collapse = "\n\n")}} produces in R-devel something like <p>a b c d</p> where the empty lines may be distorted in this email, while in R-3.5.1 the empty lines cause paragraph tags around each chunk: <p>a</p> <p>b</p> <p>c</p> <p>d</p> Directly embedding the Sexpr in the Rd file also produces all <p> tags in R-devel and R-3.5.1patched., --- Georgi Boshnakov
Martin Maechler
2018-Oct-30 11:06 UTC
[Rd] disappearing paragraphs in html rendering of text from Rd macros
>>>>> Georgi Boshnakov >>>>> on Mon, 29 Oct 2018 08:57:50 +0000 writes:> Recent changes in R-devel seem to change the HTML rendering of text returned by Rd macros, > in that now empty lines do not cause paragraphs to end (the empty lines are kept but <p> tags are not set). > As a result, multiple paragraphs are output as a single one.> A complete example Rd file is at: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a.Rd> rendered (2018-10-28) with R-devel: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a.html> and R-3.5.1patched: https://github.com/GeoBosh/reprexes/blob/master/disappearingParagraphs/a351.html[..................]> Georgi BoshnakovThank you. I can reproduce what you report, thanks to your 'reprex', and will have a look in order to fix this regression in R-devel. Martin Maechler
Apparently Analagous Threads
- R CMD check does not report redundant '...' argument described in Rd File
- Is k equivalent to k:k ?
- Rd parser throws error for user macros invoked with empty argument
- tools::package_native_routine_registration_skeleton?
- Rd parser throws error for user macros invoked with empty argument