diff options
| author | Max <me@mkor.je> | 2024-09-02 12:58:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-02 12:58:33 +0000 |
| commit | c644dce81b1685383ee8d991a92991eb03f5e32e (patch) | |
| tree | efbbb92823928d5ae3f96dc14dde1f496fac080c /tests/suite | |
| parent | a2628ac9702b085f3981c7306cee366717b0b77c (diff) | |
Add warnings when labels are ignored or unattached (#4783)
Diffstat (limited to 'tests/suite')
| -rw-r--r-- | tests/suite/foundations/label.typ | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/suite/foundations/label.typ b/tests/suite/foundations/label.typ index 28c6383b..4875f697 100644 --- a/tests/suite/foundations/label.typ +++ b/tests/suite/foundations/label.typ @@ -50,6 +50,7 @@ _Visible_ --- label-in-block --- // Test that label only works within one content block. #show <strike>: strike +// Warning: 13-21 label `<strike>` is not attached to anything *This is* #[<strike>] *protected.* *This is not.* <strike> @@ -74,3 +75,25 @@ _Visible_ // Hint: 7-7 labels can only be applied in markup mode // Hint: 7-7 try wrapping your code in a markup block (`[ ]`) #{ [A] <a> } + +--- label-multiple-ignored-warn --- +// Warning: 1-8 content labelled multiple times +// Hint: 1-8 only the last label is used, the rest are ignored += Hello <a> <b> + +// Warning: 12-19 content labelled multiple times +// Hint: 12-19 only the last label is used, the rest are ignored +#let f = [#block()<c>] +#f<d> + +// Warning: 6-13 content labelled multiple times +// Hint: 6-13 only the last label is used, the rest are ignored +#[#[#block()]<e>]<f> + +// Error: 1-3 label `<a>` does not exist in the document +@a + +--- label-unattached-warn --- +#set heading(numbering: "1.") +// Warning: 1-4 label `<a>` is not attached to anything +<a> |
