----- Rodolfo García Peñas <[email protected]> a écrit :
> On Tue, 17 Jul 2012, Christophe escribió:
> 
> 
> Hi Christophe,
> 
> [...]
> 
> OTOH, I have the problem with the double quotes in the menu (still now, after 
> your patches :-( ). I don't like how you did this change, probably you should 
> check if the first character is " or ' (like you are doing it now), but if is 
> true, you should check if the last character is " o ' (the same character), 
> because your patch removes the first and the last character if is " or ', but 
> don't check if the word is quoted or the users want this character there.
> 
> For these examples (column 1) you get these (col 2), but IMO, you should get 
> col 3:
> 
> "hi" -> hi -> hi
> "hi  -> hi -> "hi
> hi"  -> hi -> hi"
> "hi' -> hi -> "hi'

Hi,

For the case 1 and 2 my patch should behave as you say in col 2, but for the 
cases 3 and 4 it should not, the way it is coded it should do this:
 hi" -> hi"   (does not change, it does not start with a (d)quote)
 "hi' -> hi'  (it drops the first, but not the last because it does not match 
the first)

I believe the right behaviour for case 2, 3 and 4 would actually to generate a 
message about missing closing (d)quote, and I believe the current codes already 
does this at the time it parses the line.

Which is what you'll get (a check's better than a belief):
/usr/lib/WindowMaker/wmaker(WMenuParser(/home/chris/GNUstep/Library/WindowMaker/menu.hook:38)):
 warning: missing closing quote or double-quote before end-of-line

(probably followed by a "missing command in menu config", because that's the 
way the parser is supposed to behave, and depending on where the error is you 
may get a "menu could not be loaded - look at console" dialog from wmaker - I 
guess I'll have to improve this behaviour).

Best regards,
Christophe.



--
To unsubscribe, send mail to [email protected].

Reply via email to