diff options
Diffstat (limited to 'gemini')
-rw-r--r-- | gemini/mimeTextGemini.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gemini/mimeTextGemini.ml b/gemini/mimeTextGemini.ml index ca4cd32..95f432b 100644 --- a/gemini/mimeTextGemini.ml +++ b/gemini/mimeTextGemini.ml @@ -136,7 +136,6 @@ struct let take_line = lift (fun s -> Text s) take_till_cr in peek_char >>= function | Some '#' -> fail "text line cannot start with #" - | Some '*' -> fail "text line cannot start with *" | Some '>' -> fail "text line cannot start with >" | Some '`' -> (peek_string 3 >>= function | "```" -> fail "text line cannot start with ```" @@ -144,6 +143,9 @@ struct | Some '=' -> (peek_char >>= function | Some '>' -> fail "text line cannot start with =>" | _ -> take_line) + | Some '*' -> (peek_char >>= function + | Some ' ' -> fail "text line cannot start with `* '" + | _ -> take_line) | _ -> take_line let str_to_text_line = parse_string text_parser @@ -164,7 +166,7 @@ struct let str_to_pre_block = parse_string pre_block_parser let list_item_parser = - lift (fun x -> Ul x) (string "*" *> skip_spaces *> take_till_cr) + lift (fun x -> Ul x) (string "* " *> skip_spaces *> take_till_cr) let str_to_list_line = parse_string list_item_parser |