cuneiform team mailing list archive
-
cuneiform team
-
Mailing list archive
-
Message #00056
Re: [PATCH] HTML <> - < > output
On Mon, Sep 8, 2008 at 4:32 PM, René Rebe <rene.rebe@xxxxxxxxx> wrote:
> the original HTML output just maps <> to (), which is not too useful. Map it
> to < > instead.
>
> Additionally one might map & to & - as in the second patch, however
> I have not yet gotten cuneiform to recognize a single &, even if 48pt on a
> lonely sheet ... :-( Maybe some training data is missing?
Mixing ampersand code with < and > is not very elegant. I'd use something like
case '<':
case '>':
if (gFormat == ROUT_FMT_HTML) {
*gMemCur++ = '&';
*gMemCur++ = (c1 == '<' ? 'l' : 'g');
*gMemCur++ = 't';
*gMemCur++ = ';';
return TRUE;
}
break;
case '&':
if(gFormat == ROUT_FMT_HTML) {
*gMemCur++ = '&';
*gMemCur++ = 'a';
*gMemCur++ = 'm';
*gMemCur++ = 'p';
*gMemCur++ = ';';
return TRUE;
}
break;
References