From fd73880a87231e0bd92b5033c0eaac6e36ae6587 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 14 Dec 2023 12:28:04 -0800 Subject: Typst writer: emit `;` after typst code... unless followed by space. Otherwise there's the potential that the typst code will swallow up a following character. Closes #9252. --- test/writer.typst | 60 +++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'test') diff --git a/test/writer.typst b/test/writer.typst index b450bb2a3..bd3f62b33 100644 --- a/test/writer.typst +++ b/test/writer.typst @@ -435,13 +435,13 @@ yellow fruit Multiple blocks with italics: -/ #emph[apple]: #block[ +/ #emph[apple];: #block[ red fruit contains seeds, crisp, pleasant to taste ] -/ #emph[orange]: #block[ +/ #emph[orange];: #block[ orange fruit ``` @@ -571,27 +571,27 @@ Hr’s: = Inline Markup -This is #emph[emphasized], and so #emph[is this]. +This is #emph[emphasized];, and so #emph[is this];. -This is #strong[strong], and so #strong[is this]. +This is #strong[strong];, and so #strong[is this];. -An #emph[#link("/url")[emphasized link]]. +An #emph[#link("/url")[emphasized link];];. -#strong[#emph[This is strong and em.]] +#strong[#emph[This is strong and em.];] -So is #strong[#emph[this]] word. +So is #strong[#emph[this];] word. -#strong[#emph[This is strong and em.]] +#strong[#emph[This is strong and em.];] -So is #strong[#emph[this]] word. +So is #strong[#emph[this];] word. This is code: `>`, `$`, `\`, `\$`, ``. -#strike[This is #emph[strikeout].] +#strike[This is #emph[strikeout];.] -Superscripts: a#super[bc]d a#super[#emph[hello]] a#super[hello~there]. +Superscripts: a#super[bc];d a#super[#emph[hello];] a#super[hello~there];. -Subscripts: H#sub[2]O, H#sub[23]O, H#sub[many~of~them]O. +Subscripts: H#sub[2];O, H#sub[23];O, H#sub[many~of~them];O. These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a\~b c\~d. @@ -609,7 +609,7 @@ a^b c^d, a\~b c\~d. 'He said, "I want to go."' Were you alive in the 70’s? Here is some quoted '`code`' and a -"#link("http://example.com/?foo=1&bar=2")[quoted link]". +"#link("http://example.com/?foo=1&bar=2")[quoted link];". Some dashes: one—two — three—four — five. @@ -701,13 +701,13 @@ Minus: - == Explicit -Just a #link("/url/")[URL]. +Just a #link("/url/")[URL];. -#link("/url/")[URL and title]. +#link("/url/")[URL and title];. -#link("/url/")[URL and title]. +#link("/url/")[URL and title];. -#link("/url/")[URL and title]. +#link("/url/")[URL and title];. #link("/url/")[URL and title] @@ -717,21 +717,21 @@ Just a #link("/url/")[URL]. #link("mailto:nobody@nowhere.net")[Email link] -#link("")[Empty]. +#link("")[Empty];. == Reference -Foo #link("/url/")[bar]. +Foo #link("/url/")[bar];. -With #link("/url/")[embedded \[brackets\]]. +With #link("/url/")[embedded \[brackets\]];. #link("/url/")[b] by itself should be a link. -Indented #link("/url")[once]. +Indented #link("/url")[once];. -Indented #link("/url")[twice]. +Indented #link("/url")[twice];. -Indented #link("/url")[thrice]. +Indented #link("/url")[thrice];. This should \[not\]\[\] be a link. @@ -739,20 +739,20 @@ This should \[not\]\[\] be a link. [not]: /url ``` -Foo #link("/url/")[bar]. +Foo #link("/url/")[bar];. -Foo #link("/url/")[biz]. +Foo #link("/url/")[biz];. == With ampersands Here’s a -#link("http://example.com/?foo=1&bar=2")[link with an ampersand in the URL]. +#link("http://example.com/?foo=1&bar=2")[link with an ampersand in the URL];. -Here’s a link with an amersand in the link text: #link("http://att.com/")[AT&T]. +Here’s a link with an amersand in the link text: #link("http://att.com/")[AT&T];. -Here’s an #link("/script?foo=1&bar=2")[inline link]. +Here’s an #link("/script?foo=1&bar=2")[inline link];. -Here’s an #link("/script?foo=1&bar=2")[inline link in pointy braces]. +Here’s an #link("/script?foo=1&bar=2")[inline link in pointy braces];. == Autolinks @@ -780,7 +780,7 @@ or here: From "Voyage dans la Lune" by Georges Melies \(1902): -#figure([#box(width: 150.0pt, image("lalune.jpg"))], +#figure([#box(width: 150.0pt, image("lalune.jpg"));], caption: [ lalune ] -- cgit v1.2.3