Skip to content

Commit

Permalink
Find out which tags would be affected by whitespace termination
Browse files Browse the repository at this point in the history
  • Loading branch information
jonludlam committed Oct 16, 2024
1 parent 30a7758 commit d327b0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/driver/run.ml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ let run env cmd output_file =
let t_end = Unix.gettimeofday () in
let r = String.split_on_char '\n' r in
let time = t_end -. t_start in
List.iter (fun l -> Logs.debug (fun m -> m "%d - %s" myn l)) @@ String.split_on_char '\n' errors;
commands := { cmd; time; output_file; errors } :: !commands;
r

Expand Down
9 changes: 9 additions & 0 deletions src/parser/syntax.ml
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,9 @@ let rec block_element_list :
let content, _stream_head, where_in_line =
block_element_list In_tag ~parent_markup:token input
in
if List.length content > 1 then
Format.eprintf "XXXXXXXXX: Found more than one content element in a tag: %s line %d\n%!" location.Loc.file location.Loc.start.line;

let tag =
match tag with
| `Deprecated -> `Deprecated content
Expand All @@ -852,6 +855,9 @@ let rec block_element_list :
let content, _stream_head, where_in_line =
block_element_list In_tag ~parent_markup:token input
in
if List.length content > 1 then
Format.eprintf "XXXXXXXXX: Found more than one content element in a tag: %s line %d\n%!" location.Loc.file location.Loc.start.line;

let tag =
match tag with
| `Param s -> `Param (s, content)
Expand All @@ -868,6 +874,9 @@ let rec block_element_list :
let content, _next_token, where_in_line =
block_element_list In_tag ~parent_markup:token input
in
if List.length content > 1 then
Format.eprintf "XXXXXXXXX: Found more than one content element in a tag: %s line %d\n%!" location.Loc.file location.Loc.start.line;

let location =
location :: List.map Loc.location content |> Loc.span
in
Expand Down

0 comments on commit d327b0d

Please sign in to comment.