File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ Delete this section if it does not apply to your module. Provide the user with v
4545
4646. Use an unnumbered bullet (*) if the procedure includes only one step.
4747
48-
4948[role="_additional-resources"]
5049.Additional resources
5150////
Original file line number Diff line number Diff line change @@ -129,8 +129,18 @@ impl Input {
129129 . to_string ( ) ;
130130 }
131131
132+ // Remove excess blank lines that might have been left by the verious
133+ // replacement stages. Make sure that the result contains no more than one
134+ // consecutive blank line.
135+ let two_blanks = "\n \n \n " ;
136+ let one_blank = "\n \n " ;
137+
138+ while document. contains ( two_blanks) {
139+ document = document. replace ( two_blanks, one_blank) ;
140+ }
141+
132142 // Add newlines at the end of the document to prevent potential issues
133143 // when including two AsciiDoc files right next to each other.
134- document + " \n \n "
144+ document + one_blank
135145 }
136146}
You can’t perform that action at this time.
0 commit comments