-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Milestone
Description
Subject: When math elements have labels with spaces html validators are unhappy
Problem
Issue happens here: https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/mathbase.py#L89 but also other areas in that file where id
is set,
Procedure to reproduce the problem
.. math::
:label: This is a label
\nabla^2 f =
\frac{1}{r^2} \frac{\partial}{\partial r}
\left( r^2 \frac{\partial f}{\partial r} \right)
Error logs / results
Error: Bad value equation-This is a label for attribute id on element div: An ID must not contain whitespace.
From line 299, column 1; to line 299, column 48
`ther:</p>↩<div class="math" id="equation-This is a label">↩<span`
Expected results
It should convert whitespace from the label to use dashes.
Reproducible project / your project
https://sphinx-rtd-theme.readthedocs.io/en/latest/demo/demo.html#math
Environment info
- OS: All
- Python version: 3.6
- Sphinx version: 1.6.x