File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,12 @@ normalizePlainText rawStr =
343343
344344 hasLastSpace =
345345 String . right 1 rawStr
346- |> String . any isWhiteSpace
346+ -- `|> String.any isWhiteSpace` may cause infinite loop
347+ |> String . foldl
348+ ( \ c acc ->
349+ acc || isWhiteSpace c
350+ )
351+ False
347352
348353 words =
349354 case normalizedWords rawStr of
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ myMarkdown =
2828 { ordered = False
2929 , items =
3030 [ { content =
31- [ Ast . PlainText " List Item 1"
31+ [ Ast . PlainText " List Item 1😈 "
3232 ]
3333 , children =
3434 [ Ast . ListBlock
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Markdown AST represents *Markdown* AST.
1818
1919## Section
2020
21- * List Item 1
21+ * List Item 1😈
2222 1. Child item
2323* List Item 2
2424
You can’t perform that action at this time.
0 commit comments