diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-01-19 23:12:25 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-01-19 23:13:21 +0900 |
commit | f91c7327494a8dab1e1bcc985fcadb0cc6cb5ebf (patch) | |
tree | e3e6c4930d6e29fea6583278b6016cee7f8aeffc /tests/test_ext_math.py | |
parent | f9a53f50c6cc9034a0fa7fb171b4c7a8553f7821 (diff) | |
download | sphinx-git-f91c7327494a8dab1e1bcc985fcadb0cc6cb5ebf.tar.gz |
Fix #4438: math: math with labels with whitespace cause html error
Diffstat (limited to 'tests/test_ext_math.py')
-rw-r--r-- | tests/test_ext_math.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_ext_math.py b/tests/test_ext_math.py index 2b8a68f9c..8ecf7ca4d 100644 --- a/tests/test_ext_math.py +++ b/tests/test_ext_math.py @@ -27,9 +27,9 @@ def test_jsmath(app, status, warning): assert (u'<span class="eqno">(1)<a class="headerlink" href="#equation-foo" ' u'title="Permalink to this equation">\xb6</a></span>' u'<div class="math" id="equation-foo">\ne^{i\\pi} = 1</div>' in content) - assert (u'<span class="eqno">(2)<a class="headerlink" href="#equation-math:0" ' + assert (u'<span class="eqno">(2)<a class="headerlink" href="#equation-math-0" ' u'title="Permalink to this equation">\xb6</a></span>' - u'<div class="math" id="equation-math:0">\n' + u'<div class="math" id="equation-math-0">\n' u'e^{ix} = \\cos x + i\\sin x</div>' in content) assert '<div class="math">\nn \\in \\mathbb N</div>' in content assert '<div class="math">\na + 1 < b</div>' in content @@ -85,7 +85,7 @@ def test_math_number_all_mathjax(app, status, warning): app.builder.build_all() content = (app.outdir / 'index.html').text() - html = (r'<div class="math" id="equation-index:0">\s*' + html = (r'<div class="math" id="equation-index-0">\s*' r'<span class="eqno">\(1\)<a .*>\xb6</a></span>\\\[a\^2\+b\^2=c\^2\\\]</div>') assert re.search(html, content, re.S) |