From 0761aebb8ff6c5b55e1c2a4f3d5e4cfad53a327e Mon Sep 17 00:00:00 2001
From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?=
Date: Mon, 18 Jun 2018 11:42:07 +0200
Subject: [PATCH] m.math: properly escape formula sources in the output.
---
doxygen/test/contents_math/index.html | 2 +-
pelican-plugins/latex2svgextra.py | 3 ++-
pelican-plugins/m/math.py | 5 +++--
.../m/test/math/page-code-fallback.html | 4 ++++
pelican-plugins/m/test/math/page.html | 19 +++++++++++++++++++
pelican-plugins/m/test/math/page.rst | 8 ++++++++
6 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/doxygen/test/contents_math/index.html b/doxygen/test/contents_math/index.html
index 6c9b9592..f7cc6df0 100644
--- a/doxygen/test/contents_math/index.html
+++ b/doxygen/test/contents_math/index.html
@@ -108,7 +108,7 @@ $c^2$
should be part of a new paragraph, not stuck out of it. The following formula has a custom environment:
diff --git a/pelican-plugins/m/test/math/page.html b/pelican-plugins/m/test/math/page.html
index 8c1669a3..bffc2b62 100644
--- a/pelican-plugins/m/test/math/page.html
+++ b/pelican-plugins/m/test/math/page.html
@@ -191,6 +191,25 @@ W = \sum_{i=0}^{n} \cfrac{w_i}{h_i}
+
Properly escape the formula source:
+
+
diff --git a/pelican-plugins/m/test/math/page.rst b/pelican-plugins/m/test/math/page.rst
index d5e8c3c2..c1867088 100644
--- a/pelican-plugins/m/test/math/page.rst
+++ b/pelican-plugins/m/test/math/page.rst
@@ -20,3 +20,11 @@ the lines :math:`W = \sum_{i=0}^{n} \frac{w_i}{h_i}` because
:math:`Y = \sum_{i=0}^{n} B`
The ``\cfrac`` thing doesn't align well: :math:`W = \sum_{i=0}^{n} \cfrac{w_i}{h_i}`
+
+Properly escape the formula source:
+
+.. math::
+
+ \begin{array}{rcl}
+ x & = & 1
+ \end{array}
--
2.30.2