import sys
import_rx = re.compile("^@import url\\('(?P<file>[^']+)'\\);$")
-opening_brace_rx = re.compile("^\\s*:root\s*{\\s*$")
+opening_brace_rx = re.compile("^\\s*:root\\s*{\\s*$")
closing_brace_rx = re.compile("^\\s*}\\s*$")
comment_rx = re.compile("^\\s*(/\\*.*\\*/)?\\s*$")
comment_start_rx = re.compile("^\\s*(/\\*.*)\\s*$")
self.assertFalse(os.path.exists(os.path.join(self.path, 'm.math.cache')))
# Actually generated from $\frac{\tau}{2}$ tho
-tau_half_hash = sha1("""$\pi$""".encode('utf-8')).digest()
+tau_half_hash = sha1("""$\\pi$""".encode('utf-8')).digest()
tau_half = """<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.3 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='5.847936pt' height='15.326665pt' viewBox='1.195514 -8.1387 4.678349 12.261332'>
# The file is the same expect for titles of the formulas. Replace them
# and then compare.
with open(os.path.join(self.path, 'output', 'page.html')) as f:
- actual_contents = f.read().strip().replace('a^3 + b^3 \\neq c^3', 'a^2 + b^2 = c^2').replace('\\frac{\\tau}{2}', '\pi')
+ actual_contents = f.read().strip().replace('a^3 + b^3 \\neq c^3', 'a^2 + b^2 = c^2').replace('\\frac{\\tau}{2}', '\\pi')
self.assertEqual(actual_contents, expected_contents)