From: Vladimír Vondruš
Date: Sat, 14 Sep 2024 22:45:24 +0000 (+0200)
Subject: documentation/doxygen: adapt test to spacing changes in math in 1.9.x.
X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=b938e87b5bfba774845acb0ae14d09c61fd3685b;p=blog.git
documentation/doxygen: adapt test to spacing changes in math in 1.9.x.
Not sure which version, really. Don't want to plow through the
messy changelogs.
---
diff --git a/documentation/test_doxygen/contents_math_cached/math-197.html b/documentation/test_doxygen/contents_math_cached/math-197.html
new file mode 100644
index 00000000..26b4db20
--- /dev/null
+++ b/documentation/test_doxygen/contents_math_cached/math-197.html
@@ -0,0 +1,68 @@
+
+
+
+
+ Math | My Project
+
+
+
+
+
+
+
+
+
+
+
+ Math
+
+
In order to actually test use of the cache, I need to cheat a bit. Inline formula which is pi in the source but here. Then a block formula which is a Pythagorean theorem in source but not in the output:
+
+
+
+
+
+
diff --git a/documentation/test_doxygen/contents_math_cached/math.html b/documentation/test_doxygen/contents_math_cached/math.html
index 26b4db20..b0105df1 100644
--- a/documentation/test_doxygen/contents_math_cached/math.html
+++ b/documentation/test_doxygen/contents_math_cached/math.html
@@ -37,7 +37,9 @@ $ \pi $
here. Then a block formula which is a Pythagorean theorem in source but not in the output:
"""
# Actually generated from \[ a^3 + b^3 \neq c^3 \] tho
- self.fermat_hash = sha1(r"""\[ a^2 + b^2 = c^2 \]""".encode('utf-8')).digest()
+ # Doxygen 1.9.8+ (or maybe earlier? 1.9.1 not yet) changes the spacing,
+ # so have to calculate the hash differently
+ if parse_version(doxygen_version()) >= parse_version("1.9.8"):
+ self.fermat_hash = sha1("""\\[\n a^2 + b^2 = c^2\n\\]""".encode('utf-8')).digest()
+ else:
+ self.fermat_hash = sha1(r"""\[ a^2 + b^2 = c^2 \]""".encode('utf-8')).digest()
self.fermat = """