Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.15.0
version=0.17.0
4 changes: 2 additions & 2 deletions src/document/codefmt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module State = struct
if Stack.is_empty state.context then List.rev state.current
else (
leave state;
flush state )
flush state)
end

(** Modern implementation using semantic tags, Only for 4.08+ *)
Expand Down Expand Up @@ -178,7 +178,7 @@ let rec list ?sep ~f = function
| x :: xs -> (
let hd = f x in
let tl = list ?sep ~f xs in
match sep with None -> hd ++ tl | Some sep -> hd ++ sep ++ tl )
match sep with None -> hd ++ tl | Some sep -> hd ++ sep ++ tl)

let render f = spf "@[%t@]" (span f)

Expand Down
6 changes: 3 additions & 3 deletions src/document/comment.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module Reference = struct
let s = source_of_code s in
[ inline @@ Inline.Source s ]
| Some s ->
[ inline @@ Inline.InternalLink (InternalLink.Unresolved s) ] )
[ inline @@ Inline.InternalLink (InternalLink.Unresolved s) ])
| `Dot (parent, s) -> unresolved ?text (parent :> t) s
| `Module (parent, s) ->
unresolved ?text (parent :> t) (ModuleName.to_string s)
Expand Down Expand Up @@ -145,7 +145,7 @@ module Reference = struct
| Error exn ->
(* FIXME: better error message *)
Printf.eprintf "Id.href failed: %S\n%!" (Url.Error.to_string exn);
txt )
txt)

and unresolved : ?text:Inline.t -> Reference.t -> string -> Inline.t =
fun ?text parent field ->
Expand Down Expand Up @@ -298,7 +298,7 @@ let attached_block_element : Comment.attached_block_element -> Block.t =
| `Tag t -> (
match tag t with
| None -> []
| Some t -> [ block ~attr:[ "at-tags" ] @@ Description [ t ] ] )
| Some t -> [ block ~attr:[ "at-tags" ] @@ Description [ t ] ])

(* TODO collaesce tags *)

Expand Down
4 changes: 2 additions & 2 deletions src/document/doctree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module Take = struct
| Rec x -> loop acc (x @ rest)
| Accum v -> loop (List.rev_append v acc) rest
| Stop_and_keep -> (List.rev acc, None, b :: rest)
| Stop_and_accum (v, e) -> (List.rev_append acc v, e, rest) )
| Stop_and_accum (v, e) -> (List.rev_append acc v, e, rest))
in
loop [] items
end
Expand All @@ -37,7 +37,7 @@ module Rewire = struct
if level > current_level then
let children, rest = loop level [] rest in
loop current_level (node h children :: acc) rest
else (List.rev acc, l) )
else (List.rev acc, l))
in
let trees, rest = loop (-1) [] items in
assert (rest = []);
Expand Down
Loading