[LyX/master] Fix prefs2prefs for \\set_color

Kornel Benko kornel at lyx.org
Tue Dec 15 09:35:39 UTC 2020


Am Tue, 15 Dec 2020 09:59:43 +0100
schrieb Jürgen Spitzmüller <spitz at lyx.org>:

> Am Di., 15. Dez. 2020 um 09:57 Uhr schrieb Kornel Benko <kornel at lyx.org>:
> 
> > Am Tue, 15 Dec 2020 08:45:24 +0100 (CET)
> > schrieb Juergen Spitzmueller <spitz at lyx.org>:
> >
> > > +     colre = re.compile(r'^\\set_color\s+(.*)\s+(.*)"', re.IGNORECASE)
> > > +     if not m:
> > > +             return no_match
> > > +     line += " " + m.group(2) + '"'
> >
> > Are you sure?
> > Why not something like
> >         colre = re.compile(r'^\\set_color\s+("[^"]+")\s+("[^"]+")\s*$',
> > re.IGNORECASE)
> >         if not m:
> >                 return no_match
> >         line += " " + m.group(2)
> >
> 
> Feel free to improve!
> 
> Jürgen

Maybe I am too picky. For our use both versions give the same result.

	Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20201215/97505ce3/attachment-0001.asc>


More information about the lyx-devel mailing list