File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,12 @@ normalizePlainText rawStr =
343
343
344
344
hasLastSpace =
345
345
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
347
352
348
353
words =
349
354
case normalizedWords rawStr of
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ myMarkdown =
28
28
{ ordered = False
29
29
, items =
30
30
[ { content =
31
- [ Ast . PlainText " List Item 1"
31
+ [ Ast . PlainText " List Item 1😈 "
32
32
]
33
33
, children =
34
34
[ Ast . ListBlock
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Markdown AST represents *Markdown* AST.
18
18
19
19
## Section
20
20
21
- * List Item 1
21
+ * List Item 1😈
22
22
1. Child item
23
23
* List Item 2
24
24
You can’t perform that action at this time.
0 commit comments