Skip to content

Commit

Permalink
tests to warn when a table is unclosed
Browse files Browse the repository at this point in the history
  • Loading branch information
lubegasimon committed Nov 30, 2023
1 parent 3a5f9af commit db09f67
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/xref2/github_issue_1043.t/run.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#Repro for github issue 1043 (unclosed table)

Warns when a table is unclosed.
$ ocamlc -bin-annot -c unclosed_light_table.mli

$ odoc compile unclosed_light_table.cmti
File "unclosed_light_table.mli", line 7, characters 1-1:
Warning: Unclosed table '{t ...' or '{table ...'
Suggestion: try to add '}' at the end of table content.

$ ocamlc -bin-annot -c unclosed_heavy_table.mli

$ odoc compile unclosed_heavy_table.cmti
File "unclosed_heavy_table.mli", line 9, characters 1-1:
Warning: Unclosed table '{t ...' or '{table ...'
Suggestion: try to add '}' at the end of table content.

9 changes: 9 additions & 0 deletions test/xref2/github_issue_1043.t/unclosed_heavy_table.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(** {table
{tr
{th Header 1}
}
{tr
{td Cell 1}
}
*)
7 changes: 7 additions & 0 deletions test/xref2/github_issue_1043.t/unclosed_light_table.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

(** {t
| Header 1 |
| :------: |
| centered |
*)

0 comments on commit db09f67

Please sign in to comment.