Absorb surrounding punctuation into inline math
Browsers and MathJax do not always handle line breaks well for punctuation adjacent to inline math. We can absorb these into the math via \text{}. This seems to be limited to HTML and not necessary for LaTeX.
Similar work for display math is at 63c228d3 and 774a7e58
For something like (such as y=mx+b) we may need to be careful about the fonts used for the two parentheses. See the MathJax config flag mtextFontInherit documented at
http://docs.mathjax.org/en/latest/options/HTML-CSS.html
Trailing, clause-ending punctuation has been implemented at ff534cfe
But there is more to do before closing this.
At the accessibility workshop, we learned that having HTML where punctuation has been pulled inside the math is bad. Can we wrap the math and adjacent punctuation (including things like "-axis") inside a span that does not permit line breaking?
A complicated problem, mostly resolved.
We are still putting things like \text{.} inside inline math. We should stop doing that, and PR #1596 is one approach.