diff options
| author | tingerrr <github@tinger.dev> | 2023-09-25 16:19:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-25 16:19:22 +0200 |
| commit | 063e9afccf74201e0d4a8041b48a7a5028e905c3 (patch) | |
| tree | a7c26180982a131ed4808ee2f2b0f3380ad1b658 /tests | |
| parent | 079ccd5e5b8558b177c8b583948c60d75e3f547f (diff) | |
Add custom smart quotes (#2209)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/text/smartquotes.png | bin | 0 -> 7843 bytes | |||
| -rw-r--r-- | tests/typ/text/smartquotes.typ | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/ref/text/smartquotes.png b/tests/ref/text/smartquotes.png Binary files differnew file mode 100644 index 00000000..a6a8cbb5 --- /dev/null +++ b/tests/ref/text/smartquotes.png diff --git a/tests/typ/text/smartquotes.typ b/tests/typ/text/smartquotes.typ new file mode 100644 index 00000000..da31866e --- /dev/null +++ b/tests/typ/text/smartquotes.typ @@ -0,0 +1,29 @@ +// Test setting custom smartquotes + +--- +// Use language quotes for missing keys, allow partial reset +#set smartquote(quotes: "«»") +"Double and 'Single' Quotes" + +#set smartquote(quotes: (double: auto, single: "«»")) +"Double and 'Single' Quotes" + +--- +// Allow 2 graphemes +#set smartquote(quotes: "a\u{0301}a\u{0301}") +"Double and 'Single' Quotes" + +#set smartquote(quotes: (single: "a\u{0301}a\u{0301}")) +"Double and 'Single' Quotes" + +--- +// Error: 25-28 expected 2 characters, found 1 character +#set smartquote(quotes: "'") + +--- +// Error: 25-35 expected 2 quotes, found 4 quotes +#set smartquote(quotes: ("'",) * 4) + +--- +// Error: 25-45 expected 2 quotes, found 4 quotes +#set smartquote(quotes: (single: ("'",) * 4)) |
