From b2d7f3d153c0cf228bc17bba5fa679cfc4e2ecb2 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:51:55 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- test/testdata/demopackage_dir.html | 20 +- test/testdata/math_misc.html | 290 +++++++++++++++-------------- 2 files changed, 156 insertions(+), 154 deletions(-) diff --git a/test/testdata/demopackage_dir.html b/test/testdata/demopackage_dir.html index 9f6dcbda..c84f2229 100644 --- a/test/testdata/demopackage_dir.html +++ b/test/testdata/demopackage_dir.html @@ -1078,17 +1078,15 @@
1""" - 2A sub-package. - 3 - 4It imports and re-exposes ..child_b.B, and links to `..C` . - 5""" - 6 - 7from ..child_b import B - 8 - 9__all__ = [ -10 "B" -11] +diff --git a/test/testdata/math_misc.html b/test/testdata/math_misc.html index 44f05e85..874fc03e 100644 --- a/test/testdata/math_misc.html +++ b/test/testdata/math_misc.html @@ -86,83 +86,87 @@1""" +2A sub-package. +3 +4It imports and re-exposes ..child_b.B, and links to `..C` . +5""" +6 +7from ..child_b import B +8 +9__all__ = ["B"]3https://github.com/mitmproxy/pdoc/issues/639 4""" 5 - 6def test_stars(): - 7 r""" - 8 Markdown emphasis tokens (`*`) should not be captured in math mode. - 9 -10 Currently broken: $*xyz*$ -11 -12 Workaround (escaping `*`): $\*xyz\*$ -13 -14 Workaround (extra whitespace): $* xyz *$ -15 -16 """ -17 -18def test_math_newline(): -19 r""" -20 Markdown should not consume double backslashes (math newlines) in math mode. -21 -22 Currently broken: + 6 + 7def test_stars(): + 8 r""" + 9 Markdown emphasis tokens (`*`) should not be captured in math mode. +10 +11 Currently broken: $*xyz*$ +12 +13 Workaround (escaping `*`): $\*xyz\*$ +14 +15 Workaround (extra whitespace): $* xyz *$ +16 +17 """ +18 +19 +20def test_math_newline(): +21 r""" +22 Markdown should not consume double backslashes (math newlines) in math mode. 23 -24 $$ -25 \begin{align\*} -26 f(x) &= x^2\\ -27 &= x \cdot x -28 \end{align\*} -29 $$ -30 -31 Workaround (escaping `\\`): +24 Currently broken: +25 +26 $$ +27 \begin{align\*} +28 f(x) &= x^2\\ +29 &= x \cdot x +30 \end{align\*} +31 $$ 32 -33 $$ -34 \begin{align\*} -35 f(x) &= x^2\\\\ -36 &= x \cdot x -37 \end{align\*} -38 $$ -39 """ -40 -41def test_markdown_newline(): -42 r""" -43 Markdown newlines (`\n\n`) should not emit a paragraph break in math mode. -44 -45 Currently broken: -46 -47 $$ -48 x + y +33 Workaround (escaping `\\`): +34 +35 $$ +36 \begin{align\*} +37 f(x) &= x^2\\\\ +38 &= x \cdot x +39 \end{align\*} +40 $$ +41 """ +42 +43 +44def test_markdown_newline(): +45 r""" +46 Markdown newlines (`\n\n`) should not emit a paragraph break in math mode. +47 +48 Currently broken: 49 -50 = z -51 $$ +50 $$ +51 x + y 52 -53 Workaround (no empty lines in math mode): -54 -55 $$ -56 x + y -57 % comment -58 = z -59 $$ -60 """ -61 -62def test_macros(): -63 r""" -64 Markdown should not capture headings (`#`) in math mode. -65 Currently broken: -66 -67 $$ -68 \newcommand{\define}[2] -69 { -70 #1 \quad \text{#2} -71 } -72 \define{e^{i\pi}+1=0}{Euler's identity} -73 $$ -74 -75 -76 Workaround (no lines with leading `#`): -77 -78 $$ -79 \newcommand{\define}[2]{#1 \quad \text{#2}} -80 \define{e^{i\pi}+1=0}{Euler's identity} -81 $$ -82 """ +53 = z +54 $$ +55 +56 Workaround (no empty lines in math mode): +57 +58 $$ +59 x + y +60 % comment +61 = z +62 $$ +63 """ +64 +65 +66def test_macros(): +67 r""" +68 Markdown should not capture headings (`#`) in math mode. +69 Currently broken: +70 +71 $$ +72 \newcommand{\define}[2] +73 { +74 #1 \quad \text{#2} +75 } +76 \define{e^{i\pi}+1=0}{Euler's identity} +77 $$ +78 +79 +80 Workaround (no lines with leading `#`): +81 +82 $$ +83 \newcommand{\define}[2]{#1 \quad \text{#2}} +84 \define{e^{i\pi}+1=0}{Euler's identity} +85 $$ +86 """
7def test_stars(): - 8 r""" - 9 Markdown emphasis tokens (`*`) should not be captured in math mode. -10 -11 Currently broken: $*xyz*$ -12 -13 Workaround (escaping `*`): $\*xyz\*$ -14 -15 Workaround (extra whitespace): $* xyz *$ -16 -17 """ +@@ -214,28 +218,28 @@8def test_stars(): + 9 r""" +10 Markdown emphasis tokens (`*`) should not be captured in math mode. +11 +12 Currently broken: $*xyz*$ +13 +14 Workaround (escaping `*`): $\*xyz\*$ +15 +16 Workaround (extra whitespace): $* xyz *$ +17 +18 """
19def test_math_newline(): -20 r""" -21 Markdown should not consume double backslashes (math newlines) in math mode. -22 -23 Currently broken: +@@ -273,26 +277,26 @@21def test_math_newline(): +22 r""" +23 Markdown should not consume double backslashes (math newlines) in math mode. 24 -25 $$ -26 \begin{align\*} -27 f(x) &= x^2\\ -28 &= x \cdot x -29 \end{align\*} -30 $$ -31 -32 Workaround (escaping `\\`): +25 Currently broken: +26 +27 $$ +28 \begin{align\*} +29 f(x) &= x^2\\ +30 &= x \cdot x +31 \end{align\*} +32 $$ 33 -34 $$ -35 \begin{align\*} -36 f(x) &= x^2\\\\ -37 &= x \cdot x -38 \end{align\*} -39 $$ -40 """ +34 Workaround (escaping `\\`): +35 +36 $$ +37 \begin{align\*} +38 f(x) &= x^2\\\\ +39 &= x \cdot x +40 \end{align\*} +41 $$ +42 """
42def test_markdown_newline(): -43 r""" -44 Markdown newlines (`\n\n`) should not emit a paragraph break in math mode. -45 -46 Currently broken: -47 -48 $$ -49 x + y +@@ -328,27 +332,27 @@45def test_markdown_newline(): +46 r""" +47 Markdown newlines (`\n\n`) should not emit a paragraph break in math mode. +48 +49 Currently broken: 50 -51 = z -52 $$ +51 $$ +52 x + y 53 -54 Workaround (no empty lines in math mode): -55 -56 $$ -57 x + y -58 % comment -59 = z -60 $$ -61 """ +54 = z +55 $$ +56 +57 Workaround (no empty lines in math mode): +58 +59 $$ +60 x + y +61 % comment +62 = z +63 $$ +64 """
63def test_macros(): -64 r""" -65 Markdown should not capture headings (`#`) in math mode. -66 Currently broken: -67 -68 $$ -69 \newcommand{\define}[2] -70 { -71 #1 \quad \text{#2} -72 } -73 \define{e^{i\pi}+1=0}{Euler's identity} -74 $$ -75 -76 -77 Workaround (no lines with leading `#`): -78 -79 $$ -80 \newcommand{\define}[2]{#1 \quad \text{#2}} -81 \define{e^{i\pi}+1=0}{Euler's identity} -82 $$ -83 """ +67def test_macros(): +68 r""" +69 Markdown should not capture headings (`#`) in math mode. +70 Currently broken: +71 +72 $$ +73 \newcommand{\define}[2] +74 { +75 #1 \quad \text{#2} +76 } +77 \define{e^{i\pi}+1=0}{Euler's identity} +78 $$ +79 +80 +81 Workaround (no lines with leading `#`): +82 +83 $$ +84 \newcommand{\define}[2]{#1 \quad \text{#2}} +85 \define{e^{i\pi}+1=0}{Euler's identity} +86 $$ +87 """