Skip to content

Commit

Permalink
will deal with perf later
Browse files Browse the repository at this point in the history
  • Loading branch information
coco33920 committed Mar 16, 2022
1 parent aec5aec commit 3d2e279
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/glossary.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ let recognize_gls lst =
| t::q when t='{' -> aux acc q
| t::q -> aux (acc^(String.make 1 t)) q
in let desc,q = aux "" lst
in (Hashtbl.find glossaries desc),desc,q;;
in (Hashtbl.find glossaries desc),desc,q;;
3 changes: 2 additions & 1 deletion lib/htmlgen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ let parse_file file =
| "book" -> parse_chapter str
| "article" -> parse_chapter str
| _ -> failwith "only articles books are supported";;

let prepare_body ?(name="TeX Created File") str nodes =
let t = "<title>"^name^"</title>" in
let t = String.cat t "<body>\n" in
Expand All @@ -130,4 +131,4 @@ let print_file ?(start_chapter=1) filename outfile name =
let file = execute file in
let c = print_list_of_section ~start_chapter:start_chapter file in
let c = prepare_body ~name:name c file in
Utils.write_to_file outfile c;;
Utils.write_to_file outfile c;;
2 changes: 1 addition & 1 deletion lib/parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ let detect_prelude fichier =
| _::q -> detect q
in detect line_list;;



let create_subsection = create_generic (parse_subsubsection) (fun (a,b,c) -> Subsection(a,b,c))
let parse_subsection = parse_generic "\\\\subsection" (create_subsection)
Expand Down
2 changes: 0 additions & 2 deletions lib/utils.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(**
Utilities
*)

(** A function reading the inputed file and outputs a string of the lines separated by a line break \n
@param filename the file to read *)
let read_file filename =
Expand Down Expand Up @@ -52,4 +51,3 @@ let transform_list_of_chars_to_string_without_the_newline lst =
| "book" -> "book"
| "article" -> "article"
| _ -> print_endline "only articles/books are supported"; exit 2;;

0 comments on commit 3d2e279

Please sign in to comment.