From 14cee72509b86ef68e7d954a1f4243323c9e0809 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Sun, 7 Jun 2020 20:28:40 -0400 Subject: Update new prefix for list items --- gemini/mimeTextGemini.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gemini/mimeTextGemini.ml') 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 -- cgit v1.2.3