Open GoogleCodeExporter opened 9 years ago
Gah, hand-crafted markup went the way of the dodo
Original comment by saschpe@mailbox.org
on 27 May 2013 at 2:09
[deleted comment]
[deleted comment]
Original comment by saschpe@mailbox.org
on 27 May 2013 at 2:20
Attachments:
Hi Sascha,
Thanks for the patch!
I'll try to take a look at it soon.
Original comment by psobe...@gmail.com
on 3 Jun 2013 at 3:52
Took a look at the code, and it looks good.
One problem I can think of is that continuation lines are hard to recognize in
a comment. For example:
# Set this to the list of allowed hosts
# hosts = host1
# host2
# host3
It's hard to tell if "host 2 is a continuation of the option value, or a
continuation of the comment.
Also, sometimes the comments are about blocks of options:
# Filtering options
# filtername = xxx
# filterhost = yyy
# Reporting options
# reportname = qqq
# reporthost = rrr
When a new value is added, if we added it after the end of the comment instead
of breaking up the comment, these issues would not come up. In other words,
we'd set the index for all option names that are seen in a group of consecutive
comment lines to be right after the end of the group.
Which behavior do you think would be better - breaking up the comment, or
inserting the new option after the end of the comment?
Original comment by psobe...@gmail.com
on 9 Jun 2013 at 2:02
Sorry for the late reply, I don't query my gmail often. The continuation line
thing is indeed an issue, if you would have
# Set this to the list of allowed hosts
# hosts = host1
# host2
# host3
I'm sure you would expect:
# Set this to the list of allowed hosts
# hosts = host1
# host2
# host3
hosts = host1
...
When it comes to the block of options, from my experience people set options
directly in-line, i.e. seldomly sort them. So
# Reporting options
# reportname = qqq
# reporthost = rrr
would just become
# Reporting options
# reportname = qqq
reportname = bla
# reporthost = rrr
reporthost = blub
instead of
# Reporting options
# reportname = qqq
# reporthost = rrr
reportname = bla
reporthost = blub
The former is easier to grok when the block of options is bigger. Another
unmentioned issue is the [DEFAULT] group. My current code doesn't get the
sorting right there. I've got to invest some time into that too....
Original comment by saschpe@mailbox.org
on 14 Jun 2013 at 2:25
Original issue reported on code.google.com by
saschpe@mailbox.org
on 27 May 2013 at 2:09Attachments: