Skip to content

Commit

Permalink
scientificnumberlatex marks its output as safe
Browse files Browse the repository at this point in the history
  • Loading branch information
christianp committed Aug 24, 2020
1 parent fcf4188 commit bbde1df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/scripts/jme-builtins.js
Expand Up @@ -571,6 +571,7 @@ newBuiltin('scientificnumberlatex', [TNum], TString, null, {
var bits = math.parseScientific(math.niceNumber(n,{style:'scientific'}));
var s = new TString(math.niceNumber(bits.significand)+' \\times 10^{'+bits.exponent+'}');
s.latex = true;
s.safe = true;
s.display_latex = true;
return s;
}
Expand All @@ -581,6 +582,7 @@ newBuiltin('scientificnumberlatex', [TDecimal], TString, null, {
var bits = math.parseScientific(n.re.toExponential());
var s = new TString(math.niceNumber(bits.significand)+' \\times 10^{'+bits.exponent+'}');
s.latex = true;
s.safe = true;
s.display_latex = true;
return s;
}
Expand Down

0 comments on commit bbde1df

Please sign in to comment.