Skip to content

Commit cfa03ce

Browse files
author
smeyer
committed
Rd2txt: avoid para break from initial newline in \eqn block
git-svn-id: https://svn.r-project.org/R/trunk@88434 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 46885e9 commit cfa03ce

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

doc/NEWS.Rd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@
228228
\item %\code{assignInNamespace("\var{S3method}")} and thus
229229
\code{fixInNamespace("\var{S3method}")} failed to update the S3
230230
methods table when the generic was not on the search path.
231+
232+
\item An initial newline inside an Rd inline \verb{\eqn} no longer
233+
breaks the paragraph in plain-text help (\code{tools::Rd2txt}).
231234
}
232235
}
233236
}

src/library/tools/R/Rd2txt.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ Rd2txt <-
696696
## FIXME: treat 2 of 2 differently?
697697
inEqn0 <- inEqn
698698
inEqn <<- TRUE
699+
dropBlank <<- TRUE
699700
writeContent(block, tag)
700701
inEqn <<- inEqn0
701702
},

tests/testit.txt.save

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ _V_a_l_u_e:
7272

7373
\_e_q_n:
7474

75-
This should not start a new paragraph:
76-
77-
1/(n-1).
75+
This should not start a new paragraph: 1/(n-1).
7876

7977
\_d_e_q_n:
8078

0 commit comments

Comments
 (0)