On Mon, Sep 8, 2008 at 4:32 PM, René Rebe <[EMAIL PROTECTED]> wrote:

> the original HTML output just maps <> to (), which is not too useful. Map it
> to  &lt; &gt; instead.
>
> Additionally one might map & to &amp; - 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;

_______________________________________________
Mailing list: https://launchpad.net/~cuneiform
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~cuneiform
More help   : https://help.launchpad.net/ListHelp

Reply via email to