File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -768,6 +768,15 @@ visitInlineCommandComment(
768
768
769
769
switch (unsigned ID = cmd->getID ())
770
770
{
771
+ // Newline
772
+ case CommandTraits::KCI_n:
773
+ {
774
+ if (! goodArgCount (0 , *C))
775
+ return ;
776
+ last_child_ = nullptr ;
777
+ emplaceText<doc::Text>(true , " \n " );
778
+ return ;
779
+ }
771
780
// Emphasis
772
781
case CommandTraits::KCI_a:
773
782
case CommandTraits::KCI_e:
@@ -1163,7 +1172,6 @@ visitBlockCommandComment(
1163
1172
case CommandTraits::KCI_memberof:
1164
1173
case CommandTraits::KCI_msc:
1165
1174
case CommandTraits::KCI_mscfile:
1166
- case CommandTraits::KCI_n:
1167
1175
case CommandTraits::KCI_name:
1168
1176
case CommandTraits::KCI_namespace:
1169
1177
case CommandTraits::KCI_noop:
@@ -1257,6 +1265,7 @@ visitBlockCommandComment(
1257
1265
case CommandTraits::KCI_a:
1258
1266
case CommandTraits::KCI_e:
1259
1267
case CommandTraits::KCI_em:
1268
+ case CommandTraits::KCI_n:
1260
1269
case CommandTraits::KCI_copybrief:
1261
1270
case CommandTraits::KCI_copydetails:
1262
1271
case CommandTraits::KCI_copydoc:
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ operator()(
196
196
for (auto const & child : children.subspan (1 ))
197
197
{
198
198
if (non_empty)
199
- dest_.push_back (' ' );
199
+ dest_.push_back (' \n ' );
200
200
non_empty = write (*child, *this );
201
201
}
202
202
dest_.push_back (' \n ' );
@@ -227,7 +227,7 @@ operator()(
227
227
for (auto const & child : children.subspan (1 ))
228
228
{
229
229
if (non_empty)
230
- dest_.push_back (' ' );
230
+ dest_.push_back (' \n ' );
231
231
non_empty = write (*child, *this );
232
232
}
233
233
dest_.push_back (' \n ' );
@@ -265,6 +265,9 @@ operator()(doc::Text const& I)
265
265
// Asciidoc text must not have leading
266
266
// else they can be rendered up as code.
267
267
std::string_view s = trim (I.string );
268
+ // Render empty lines as paragraph delimiters.
269
+ if (s.empty ())
270
+ s = " \n " ;
268
271
dest_.append (escapeAdoc (s));
269
272
}
270
273
You can’t perform that action at this time.
0 commit comments