@@ -71,7 +71,7 @@ let parse l =
7171let parse_lexbuf syntax Misc. { string; lexbuf } =
7272 match syntax with
7373 | Syntax. Mli -> Mli_parser. parse_mli string
74- | Normal ->
74+ | Markdown ->
7575 Util.Result. to_error_list @@ Lexer_mdx. markdown_token lexbuf >> = parse
7676 | Cram -> Util.Result. to_error_list @@ Lexer_mdx. cram_token lexbuf >> = parse
7777
@@ -80,7 +80,7 @@ let parse_file syntax f = Misc.load_file ~filename:f |> parse_lexbuf syntax
8080let of_string syntax s =
8181 match syntax with
8282 | Syntax. Mli -> Mli_parser. parse_mli s
83- | Syntax. Normal | Syntax. Cram ->
83+ | Syntax. Markdown | Syntax. Cram ->
8484 Misc. { lexbuf = Lexing. from_string s; string = s } |> parse_lexbuf syntax
8585
8686let dump_line ppf (l : line ) =
@@ -107,15 +107,15 @@ let write_file ~outfile content =
107107 output_string oc content;
108108 close_out oc
109109
110- let run_to_stdout ?(syntax = Normal ) ~f infile =
110+ let run_to_stdout ?(syntax = Syntax. Markdown ) ~f infile =
111111 let + _, corrected = run_str ~syntax ~f infile in
112112 print_string corrected
113113
114- let run_to_file ?(syntax = Normal ) ~f ~outfile infile =
114+ let run_to_file ?(syntax = Syntax. Markdown ) ~f ~outfile infile =
115115 let + _, corrected = run_str ~syntax ~f infile in
116116 write_file ~outfile corrected
117117
118- let run ?(syntax = Normal ) ?(force_output = false ) ~f infile =
118+ let run ?(syntax = Syntax. Markdown ) ?(force_output = false ) ~f infile =
119119 let outfile = infile ^ " .corrected" in
120120 let + test_result, corrected = run_str ~syntax ~f infile in
121121 match (force_output, test_result) with
0 commit comments