|
From: <mi...@us...> - 2022-03-05 23:27:53
|
Revision: 9029
http://sourceforge.net/p/docutils/code/9029
Author: milde
Date: 2022-03-05 23:27:50 +0000 (Sat, 05 Mar 2022)
Log Message:
-----------
Simplify code as dicts have fixed order since 3.6
We no longer need to sort a dictionary from `**kwargs`
in order to have a fixed order for stable tests.
Modified Paths:
--------------
trunk/docutils/docutils/utils/math/latex2mathml.py
trunk/docutils/test/functional/expected/math_output_mathml.html
Modified: trunk/docutils/docutils/utils/math/latex2mathml.py
===================================================================
--- trunk/docutils/docutils/utils/math/latex2mathml.py 2022-03-05 23:27:39 UTC (rev 9028)
+++ trunk/docutils/docutils/utils/math/latex2mathml.py 2022-03-05 23:27:50 UTC (rev 9029)
@@ -104,8 +104,8 @@
'Uparrow': '\u21d1', # ⇑ UPWARDS DOUBLE ARROW
'Downarrow': '\u21d3', # ⇓ DOWNWARDS DOUBLE ARROW
'Updownarrow': '\u21d5', # ⇕ UP DOWN DOUBLE ARROW
- 'lmoustache': '\u23b0', # ⎰ UPPER LEFT OR LOWER RIGHT CURLY BRACKET SECTION
- 'rmoustache': '\u23b1', # ⎱ UPPER RIGHT OR LOWER LEFT CURLY BRACKET SECTION
+ 'lmoustache': '\u23b0', # ⎰ … CURLY BRACKET SECTION
+ 'rmoustache': '\u23b1', # ⎱ … LEFT CURLY BRACKET SECTION
'arrowvert': '\u23d0', # ⏐ VERTICAL LINE EXTENSION
'bracevert': '\u23aa', # ⎪ CURLY BRACKET EXTENSION
'lvert': '|', # left |
@@ -223,15 +223,15 @@
# limits etc. -> <mover> or <munder>
over = {# TeX: (char, offset-correction/em)
- 'overbrace': ('\u23DE', -0.2), # DejaVu Math -0.6
+ 'overbrace': ('\u23DE', -0.2), # DejaVu Math -0.6
'overleftarrow': ('\u2190', -0.2),
'overleftrightarrow': ('\u2194', -0.2),
- 'overline': ('_', -0.2), # \u2012' FIGURE DASH does not stretch
+ 'overline': ('_', -0.2), # \u2012 does not stretch
'overrightarrow': ('\u2192', -0.2),
'widehat': ('^', -0.5),
'widetilde': ('~', -0.3),
}
-under = {'underbrace': ('\u23DF', 0.1), # DejaVu Math -0.7
+under = {'underbrace': ('\u23DF', 0.1), # DejaVu Math -0.7
'underleftarrow': ('\u2190', -0.2),
'underleftrightarrow': ('\u2194', -0.2),
'underline': ('_', -0.8),
@@ -338,9 +338,7 @@
self.extend(children)
self.attributes = {}
- # sort attributes for predictable functional tests
- # as self.attributes.update(attributes) does not keep order in Python < 3.6
- for key in sorted(attributes.keys()):
+ for key in attributes.keys():
# Use .lower() to allow argument `CLASS` for attribute `class`
# (Python keyword). MathML uses only lowercase attributes.
self.attributes[key.lower()] = attributes[key]
Modified: trunk/docutils/test/functional/expected/math_output_mathml.html
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.html 2022-03-05 23:27:39 UTC (rev 9028)
+++ trunk/docutils/test/functional/expected/math_output_mathml.html 2022-03-05 23:27:50 UTC (rev 9029)
@@ -392,7 +392,7 @@
<span class="docutils literal">align</span> environment:</p>
<div>
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
- <mtable class="align" columnalign="right left" columnspacing="0" displaystyle="true">
+ <mtable class="align" displaystyle="true" columnalign="right left" columnspacing="0">
<mtr>
<mtd>
<msub>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|