Message62856
I tried to come up with a patch, but the issue isn't as easy as it
seems, the proposed change is too simplistic. Leading spaces in a line
is already used for one purpose : continuations of a previous line. For
instance :
option = value
continued here
gives "option" as key and "value\n continued here" as value.
The proposal conflicts with this behavior, since having :
option1 = value1
option2 = value2
creates only one key-value pair "option1":"value1\n option2=value2"
Adding blank lines doesn't solve the issue. The only case when it's
treated correctly is when the options is the first one of a
section/file: there's no continuation since there's no previous option
defined.
One solution could be to check for the presence of a delimiter (colon or
equals sign) and not treat it as a continuation if that's the case, but
that could potentially break existing configurations files, since
nothing forbids you from using delimiters in the values.
Any opinion ?
(By the way, the leading whitespaces for comments isn't affected by all
this, the implementation is simple) |
|
| Date |
User |
Action |
Args |
| 2008-02-24 00:36:52 | quentin.gallet-gilles | set | spambayes_score: 0.00160228 -> 0.00160228 recipients:
+ quentin.gallet-gilles, kenlalonde, whit537 |
| 2008-02-24 00:36:52 | quentin.gallet-gilles | set | spambayes_score: 0.00160228 -> 0.00160228 messageid: <1203813412.53.0.132788078579.issue1524825@psf.upfronthosting.co.za> |
| 2008-02-24 00:36:51 | quentin.gallet-gilles | link | issue1524825 messages |
| 2008-02-24 00:36:51 | quentin.gallet-gilles | create | |
|