Skip to content

Commit 1811266

Browse files
committed
katex test [nfc]: Use Dart raw strings to avoid double-backslash
This is available to us now that these strings don't include the leading "```math" and trailing "```" lines, and the newlines separating them from the main content.
1 parent f14e318 commit 1811266

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/model/katex_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class KatexExample extends ContentExample {
8080

8181
static final mathBlockKatexNestedSizing = KatexExample.block(
8282
'math block; KaTeX nested sizing',
83-
'\\tiny {1 \\Huge 2}',
83+
r'\tiny {1 \Huge 2}',
8484
'<p>'
8585
'<span class="katex-display"><span class="katex">'
8686
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mstyle mathsize="0.5em"><mrow><mn>1</mn><mstyle mathsize="2.488em"><mn>2</mn></mstyle></mrow></mstyle></mrow>'
@@ -108,7 +108,7 @@ class KatexExample extends ContentExample {
108108
static final mathBlockKatexDelimSizing = KatexExample.block(
109109
'math block; KaTeX delimiter sizing',
110110
// https://chat.zulip.org/#narrow/channel/7-test-here/topic/Rajesh/near/2147135
111-
'⟨ \\big( \\Big[ \\bigg⌈ \\Bigg⌊',
111+
r'⟨ \big( \Big[ \bigg⌈ \Bigg⌊',
112112
'<p>'
113113
'<span class="katex-display"><span class="katex">'
114114
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mo stretchy="false">⟨</mo><mo fence="false" stretchy="true" minsize="1.2em" maxsize="1.2em">(</mo><mo fence="false" stretchy="true" minsize="1.8em" maxsize="1.8em">[</mo><mo fence="false" stretchy="true" minsize="2.4em" maxsize="2.4em">⌈</mo><mo fence="false" stretchy="true" minsize="3em" maxsize="3em">⌊</mo></mrow>'
@@ -188,7 +188,7 @@ class KatexExample extends ContentExample {
188188
static final mathBlockKatexSuperscript = KatexExample.block(
189189
'math block, KaTeX superscript; single vlist-r, single vertical offset row',
190190
// https://chat.zulip.org/#narrow/channel/7-test-here/topic/Rajesh/near/2176734
191-
'a\'',
191+
"a'",
192192
'<p>'
193193
'<span class="katex-display"><span class="katex">'
194194
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msup><mi>a</mi><mo mathvariant="normal" lspace="0em" rspace="0em">′</mo></msup></mrow>'
@@ -360,7 +360,7 @@ class KatexExample extends ContentExample {
360360
static final mathBlockKatexRaisebox = KatexExample.block(
361361
'math block, KaTeX raisebox; single vlist-r, single vertical offset row',
362362
// https://chat.zulip.org/#narrow/channel/7-test-here/topic/Rajesh/near/2176739
363-
'a\\raisebox{0.25em}{\$b\$}c',
363+
r'a\raisebox{0.25em}{$b$}c',
364364
'<p>'
365365
'<span class="katex-display"><span class="katex">'
366366
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>a</mi><mpadded voffset="0.25em"><mstyle scriptlevel="0" displaystyle="false"><mstyle scriptlevel="0" displaystyle="false"><mi>b</mi></mstyle></mstyle></mpadded><mi>c</mi></mrow>'
@@ -402,7 +402,7 @@ class KatexExample extends ContentExample {
402402
static final mathBlockKatexNegativeMargin = KatexExample.block(
403403
'math block, KaTeX negative margin',
404404
// https://chat.zulip.org/#narrow/channel/7-test-here/topic/Rajesh/near/2223563
405-
'1 \\! 2',
405+
r'1 \! 2',
406406
'<p>'
407407
'<span class="katex-display"><span class="katex">'
408408
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mn>1</mn><mtext> ⁣</mtext><mn>2</mn></mrow><annotation encoding="application/x-tex">1 \\! 2</annotation></semantics></math></span>'
@@ -425,7 +425,7 @@ class KatexExample extends ContentExample {
425425
static final mathBlockKatexLogo = KatexExample.block(
426426
'math block, KaTeX logo',
427427
// https://chat.zulip.org/#narrow/channel/7-test-here/topic/Rajesh/near/2141902
428-
'\\KaTeX',
428+
r'\KaTeX',
429429
'<p>'
430430
'<span class="katex-display"><span class="katex">'
431431
'<span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mtext>KaTeX</mtext></mrow>'

0 commit comments

Comments
 (0)