File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,9 @@ fn lengthen_lines(content: &str, limit: usize) -> String {
177177 let Some ( next_line) = content. get ( n + 1 ) else {
178178 continue ;
179179 } ;
180+ if next_line. trim_start ( ) . starts_with ( "```" ) {
181+ continue ;
182+ }
180183 if ignore ( next_line, in_code_block)
181184 || REGEX_LIST_ENTRY . is_match ( next_line)
182185 || REGEX_IGNORE_END . is_match ( line)
@@ -255,6 +258,12 @@ preserve next line
255258
256259preserve next line
257260* three
261+
262+ do not mess with code block chars
263+ ```
264+ leave the
265+ text alone
266+ ```
258267" ;
259268 let expected = "\
260269 do not split short sentences
@@ -269,6 +278,12 @@ preserve next line
269278
270279preserve next line
271280* three
281+
282+ do not mess with code block chars
283+ ```
284+ leave the
285+ text alone
286+ ```
272287" ;
273288 assert_eq ! ( expected, lengthen_lines( original, 50 ) ) ;
274289}
You can’t perform that action at this time.
0 commit comments