File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,10 @@ fn lengthen_lines(content: &str, limit: usize) -> String {
177177 let Some ( next_line) = content. get ( n + 1 ) else {
178178 continue ;
179179 } ;
180- if ignore ( next_line, in_code_block) || REGEX_IGNORE_END . is_match ( line) {
180+ if ignore ( next_line, in_code_block)
181+ || REGEX_LIST_ENTRY . is_match ( next_line)
182+ || REGEX_IGNORE_END . is_match ( line)
183+ {
181184 continue ;
182185 }
183186 if line. len ( ) + next_line. len ( ) < limit {
@@ -244,12 +247,28 @@ short sentences
244247<div class='warning'>
245248a bit of text inside
246249</div>
250+ preserve next line
251+ 1. one
252+
253+ preserve next line
254+ - two
255+
256+ preserve next line
257+ * three
247258" ;
248259 let expected = "\
249260 do not split short sentences
250261<div class='warning'>
251262a bit of text inside
252263</div>
264+ preserve next line
265+ 1. one
266+
267+ preserve next line
268+ - two
269+
270+ preserve next line
271+ * three
253272" ;
254273 assert_eq ! ( expected, lengthen_lines( original, 50 ) ) ;
255274}
You can’t perform that action at this time.
0 commit comments