Closed digama0 closed 9 months ago
As for HTML, the solution is similar but more complicated, because underscore undoubling in Text
depends on whether it is in HTML mode or not.
For HTML, the solution I propose in #129 seems simpler, since unescape_text
should not be called in HTML mode.
It should, because the other characters are still undoubled in HTML mode. (Observe this by running HTML generation on something like <HTML> [[ ~~ `` __ </HTML>
in metamath.exe)
The plot thickens: I tried the test above, and [
isn't getting undoubled (either in HTML mode or out). In fact I can't get [foo]
to link at all. Maybe metamath.exe got broken by the recent change?
In any case tests with[[
and ~~
within HTML should be added in the metamath-exe
test suite.
Turns out that [[
was only getting undoubled if there is a bibliography present. :roll_eyes:
fixes #128, fixes #131, supercedes #129. Rather than turning off the diagnostic, the right solution is to not be undoubling
_
inside labels/URLs. This means that we now have three different undoubling functions, since the undoubling behavior is different betweenText
,Label/Url
andMath
. metamath/metamath-exe@270e86d double checks that metamath.exe in fact does not undouble_
in labels and URLs.