disappearing paragraphs in html rendering of text from Rd macros

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

disappearing paragraphs in html rendering of text from Rd macros

Georgi Boshnakov
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: disappearing paragraphs in html rendering of text from Rd macros

Martin Maechler
>>>>> 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 Boshnakov

Thank 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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel