Skip to content

Commit a164ff2

Browse files
committed
local polyfol mathml a example
1 parent 03af119 commit a164ff2

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

spec.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@
129129
" inlinemath" +
130130
(mclass.includes("mml4p") ? " removeOnSave" : "") );
131131
m.innerHTML=mmllist[i].querySelector("pre").textContent;
132+
// echidna doesn't allow mathml a
133+
if (mclass.includes("mathmla")) {
134+
m.innerHTML=m.innerHTML
135+
.replace(/a href="(.*)"/g,"mrow tabindex=\"0\" style=\"cursor:pointer\" onclick=\"document.location='$1'\"")
136+
.replace(/<\/a>/g, "</mrow>");
137+
}
132138
var atext;
133139
var aattrib=mmllist[i].getAttribute("alttext");
134140
if (aattrib) {

src/presentation-markup.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3833,16 +3833,16 @@ <h5 id="presm_grouping_sub_expressions_ex">Examples</h5>
38333833
<p>Hyperref links that are compatible with MathML Core may be specified by using the
38343834
<code class="starttag">&lt;a&gt;</code> element rather than
38353835
<code class="starttag">&lt;mrow&gt;</code>:</p>
3836-
<div class="example mathml mmlcore">
3836+
<div class="mathmla example mathml mmlcore">
38373837
<pre>
3838-
&lt;mrow href="https://openmath.org/cd/transc1.html#arccsch"&gt;
3838+
&lt;a href="https://openmath.org/cd/transc1.html#arccsch"&gt;
38393839
&lt;mi&gt;arccsch&lt;/mi&gt;
3840-
&lt;mrow&gt;
3841-
&lt;mo&gt;(&lt;/mo&gt;
3842-
&lt;mi&gt;z&lt;/mi&gt;
3843-
&lt;mo&gt;)&lt;/mo&gt;
3844-
&lt;/mrow&gt;
3840+
&lt;mrow&gt;
3841+
&lt;mo&gt;(&lt;/mo&gt;
3842+
&lt;mi&gt;z&lt;/mi&gt;
3843+
&lt;mo&gt;)&lt;/mo&gt;
38453844
&lt;/mrow&gt;
3845+
&lt;/a&gt;
38463846
</pre>
38473847
</div>
38483848

0 commit comments

Comments
 (0)