diff options
| author | Michael Färber <01mf02@gmail.com> | 2025-01-23 13:21:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-23 12:21:34 +0000 |
| commit | b3fb6c2326ac6d585cc17d1f643bc06e076be042 (patch) | |
| tree | 2edeab197eb7549db5e20bb816cbbd314aed3ca4 /tests | |
| parent | e61cd6fb9e9a90de8d78f05a43246f08feddcf8f (diff) | |
Support quotes in HTML output (#5673)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ref/html/quote-attribution-link.html | 15 | ||||
| -rw-r--r-- | tests/ref/html/quote-nesting-html.html | 12 | ||||
| -rw-r--r-- | tests/ref/html/quote-plato.html | 21 | ||||
| -rw-r--r-- | tests/suite/model/quote.typ | 23 |
4 files changed, 71 insertions, 0 deletions
diff --git a/tests/ref/html/quote-attribution-link.html b/tests/ref/html/quote-attribution-link.html new file mode 100644 index 00000000..4da8b47f --- /dev/null +++ b/tests/ref/html/quote-attribution-link.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </head> + <body> + <blockquote cite="https://typst.app/home"> + Compose papers faster + </blockquote> + <p> + — <a href="https://typst.app/home">typst.com</a> + </p> + </body> +</html> diff --git a/tests/ref/html/quote-nesting-html.html b/tests/ref/html/quote-nesting-html.html new file mode 100644 index 00000000..c652bd97 --- /dev/null +++ b/tests/ref/html/quote-nesting-html.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </head> + <body> + <p> + When you said that “he surely meant that ‘she intended to say “I'm sorry”’”, I was quite confused. + </p> + </body> +</html> diff --git a/tests/ref/html/quote-plato.html b/tests/ref/html/quote-plato.html new file mode 100644 index 00000000..fc052d10 --- /dev/null +++ b/tests/ref/html/quote-plato.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + </head> + <body> + <blockquote> + … ἔοικα γοῦν τούτου γε σμικρῷ τινι αὐτῷ τούτῳ σοφώτερος εἶναι, ὅτι ἃ μὴ οἶδα οὐδὲ οἴομαι εἰδέναι. + </blockquote> + <p> + — Plato + </p> + <blockquote> + … I seem, then, in just this little thing to be wiser than this man at any rate, that what I do not know I do not think I know either. + </blockquote> + <p> + — from the Henry Cary literal translation of 1897 + </p> + </body> +</html> diff --git a/tests/suite/model/quote.typ b/tests/suite/model/quote.typ index 2c93f92c..d0dcc55d 100644 --- a/tests/suite/model/quote.typ +++ b/tests/suite/model/quote.typ @@ -84,3 +84,26 @@ And I quote: #quote(attribution: [René Descartes])[cogito, ergo sum]. // With custom quotes. #set smartquote(quotes: (single: ("<", ">"), double: ("(", ")"))) #quote[A #quote[nested] quote] + +--- quote-plato html --- +#set quote(block: true) + +#quote(attribution: [Plato])[ + ... ἔοικα γοῦν τούτου γε σμικρῷ τινι αὐτῷ τούτῳ σοφώτερος εἶναι, ὅτι + ἃ μὴ οἶδα οὐδὲ οἴομαι εἰδέναι. +] +#quote(attribution: [from the Henry Cary literal translation of 1897])[ + ... I seem, then, in just this little thing to be wiser than this man at + any rate, that what I do not know I do not think I know either. +] + +--- quote-nesting-html html --- +When you said that #quote[he surely meant that #quote[she intended to say #quote[I'm sorry]]], I was quite confused. + +--- quote-attribution-link html --- +#quote( + block: true, + attribution: link("https://typst.app/home")[typst.com] +)[ + Compose papers faster +] |
