/itexToMML

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/itexToMML/

« back to all changes in this revision

Viewing changes to itex-src/itex2MML.l

  • Committer: Jacques Distler
  • Date: 2013-12-08 08:07:40 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20131208080740-g4pvgkeobyp7dm84
itex2MML 1.5.0beta2

Fix a regression in handling embedded SVG.

Show diffs side-by-side

added added

removed removed

1009
1009
}
1010
1010
 
1011
1011
<SVGENV>{
1012
 
"\\end\{svg" {yylval=itex2MML_copy_string(yytext); yylval[yyleng-8]=0; BEGIN(SVGEND); return XMLSTRING;}
 
1012
"\\end\{svg" {itex2MML_capture_eqn_src(); yylval=itex2MML_copy_string(yytext); yylval[yyleng-8]=0; BEGIN(SVGEND); return XMLSTRING;}
1013
1013
(.|\n) {yymore();}
1014
1014
}
1015
1015
 
1101
1101
 
1102
1102
int itex2MML_capture_eqn_src()
1103
1103
{
1104
 
        if (YY_START != INITIAL && itex2MML_eqn_bufsize - (itex2MML_eqn_end-itex2MML_eqn_src) - yyleng > 1)
 
1104
        if (YY_START != INITIAL && YY_START != SVGENV && itex2MML_eqn_bufsize - (itex2MML_eqn_end-itex2MML_eqn_src+yyleng) > 1)
1105
1105
        {
1106
1106
                strcpy(itex2MML_eqn_end, yytext);
1107
1107
                itex2MML_eqn_end += yyleng;