File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ import TexParser from './TexParser.js';
3131import TexError from './TexError.js' ;
3232import { entities } from '../../util/Entities.js' ;
3333import { MmlMunderover } from '../../core/MmlTree/MmlNodes/munderover.js' ;
34- import { em } from '../../util/lengths.js' ;
3534
3635
3736namespace ParseUtil {
@@ -107,7 +106,10 @@ namespace ParseUtil {
107106 * @return {string } The em dimension string.
108107 */
109108 export function Em ( m : number ) : string {
110- return em ( m ) ;
109+ if ( Math . abs ( m ) < .0006 ) {
110+ return '0em' ;
111+ }
112+ return m . toFixed ( 3 ) . replace ( / \. ? 0 + $ / , '' ) + 'em' ;
111113 }
112114
113115
@@ -525,6 +527,13 @@ namespace ParseUtil {
525527 parser . stack . global . eqnenv = true ;
526528 }
527529
530+ /**
531+ * Copy an MmlNode and add it (and its children) to the proper lists.
532+ *
533+ * @param {MmlNode } node The MmlNode to copy
534+ * @param {TexParser } parser The active tex parser
535+ * @return {MmlNode } The duplicate tree
536+ */
528537 export function copyNode ( node : MmlNode , parser : TexParser ) : MmlNode {
529538 const tree = node . copy ( ) as MmlNode ;
530539 const options = parser . configuration ;
You can’t perform that action at this time.
0 commit comments