File tree Expand file tree Collapse file tree
testsuite/tests/input/tex Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -752,6 +752,35 @@ describe('AmsCD', () => {
752752
753753 /********************************************************************************/
754754
755+ it ( 'Spaces' , ( ) => {
756+ toXmlMatch (
757+ tex2mml ( '\\begin{CD}A @ > x > > B \\end{CD}' ) ,
758+ `<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @ > x > > B \\end{CD}" display="block">
759+ <mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\begin{CD}A @ > x > > B \\end{CD}">
760+ <mtr>
761+ <mtd>
762+ <mi data-latex="A">A</mi>
763+ <mpadded height="8.5pt" depth="2pt"></mpadded>
764+ </mtd>
765+ <mtd>
766+ <mover>
767+ <mo minsize="2.75em">→</mo>
768+ <mpadded width="+.67em" lspace=".33em" voffset=".1em">
769+ <mi data-latex="x">x</mi>
770+ </mpadded>
771+ </mover>
772+ </mtd>
773+ <mtd>
774+ <mi data-latex="B">B</mi>
775+ </mtd>
776+ </mtr>
777+ </mtable>
778+ </math>`
779+ ) ;
780+ } ) ;
781+
782+ /********************************************************************************/
783+
755784 it ( 'Suspicious Return' , ( ) => {
756785 toXmlMatch (
757786 tex2mml ( '\\begin{CD}A @Ra>> BaD\\end{CD}' ) ,
Original file line number Diff line number Diff line change @@ -64,9 +64,11 @@ const AmsCdMethods: { [key: string]: ParseMethod } = {
6464 * @returns {void } No value.
6565 */
6666 arrow ( parser : TexParser , name : string ) : void {
67- const c = parser . string . charAt ( parser . i ) ;
67+ const i = parser . i ;
68+ const c = parser . GetNext ( ) ;
6869 if ( ! c . match ( / [ > < V A . | = ] / ) ) {
6970 // TODO: This return is suspicious.
71+ parser . i = i ;
7072 return Other ( parser , name ) ;
7173 } else {
7274 parser . i ++ ;
You can’t perform that action at this time.
0 commit comments