[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] Possible bug in vile-perl-filter
From: |
Thomas Dickey |
Subject: |
Re: [vile] Possible bug in vile-perl-filter |
Date: |
Mon, 11 Feb 2008 20:42:32 -0500 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
On Mon, Feb 11, 2008 at 12:44:55PM +0100, Paul van Tilburg wrote:
> On Fri, Feb 08, 2008 at 05:53:02PM -0500, Steven Lembark wrote:
> >
> > Looking at the screen in 9.6d, using the stock
> > vile perl filter:
>
> While, we're at it, it seems that the tex/latex filter has
> an issue with the \} command in a math environment, e.g.:
> \foo{$\{a, b\}$}.
>
> Now, mathmode will run till the end of the document unless
> you put a space after the b?
I see - it's not detecting the "\}" as an escaped brace, and then it
decrements the brace-count, allowing the second "$" to be treated as
outside-braces and thus the start of math-mode.
Using flex's debug-mode, I see the problem; it's an incorrect pattern.
The "-" (see diff) should be last, to make it a literal character
rather than expressing a range.
I'll have to study my test-cases, but for your example this fix seems
to be all that's needed:
diff -u -r1.47 latexflt.l
--- latexflt.l 2008/01/22 01:47:02 1.47
+++ latexflt.l 2008/02/12 01:38:17
@@ -79,7 +79,7 @@
NAME [[:alpha:address@hidden
NONNAME [^[:alpha:address@hidden
-MIXED_ALNUM ({NAME}[[:digit:].-_]+)+{NAME}?
+MIXED_ALNUM ({NAME}[[:digit:]._-]+)+{NAME}?
OCTAL \'[0-7]+
DECIMAL [[:digit:]]+
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature