josdejong/mathjs

handler option for #toHTML not working

Open

#2.425 geöffnet am 17. Feb. 2022

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.298 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (13.832 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

math.parse("sumMap(list,mapper)=sum(map(list,mapper))").toHTML({handler: (node, options) => "hello"})

'<span class="math-function">sumMap</span><span class="math-parenthesis math-round-parenthesis">(</span><span class="math-symbol math-parameter">list</span><span class="math-separator">,</span><span class="math-symbol math-parameter">mapper</span><span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span><span class="math-function">sum</span><span class="math-paranthesis math-round-parenthesis">(</span><span class="math-function">map</span><span class="math-paranthesis math-round-parenthesis">(</span><span class="math-symbol">list</span><span class="math-separator">,</span><span class="math-symbol">mapper</span><span class="math-paranthesis math-round-parenthesis">)</span><span class="math-paranthesis math-round-parenthesis">)</span>'

There is no "hello" in output. Am I doing something wrong here?

Contributor Guide