[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: Better formatting for long descriptions



On Sat, 18 Apr 2009, Manoj Srivastava wrote:

       Here is an algorithm:
--8<---------------cut here---------------start------------->8---
we are not in a list
while reading each line, do
  remove leading space
  if the only non white space character on the line is a singe .
    remove the dot
  if the line matches the regexp: '^\s+[\*\+\-]\s+'
    if we are not in a list
      emit blank line first
      record we are not in a list
  else
    if we are in a list
      record we are not in a list
  emit line
--8<---------------cut here---------------end--------------->8---

       People who can not convert this 13 line Psuedocode into a real
code should not be writing stuff to pretty print descriptions.

Thanks for the trust in the programming skills of your fellow
developers.  You obviosely are able to write the code to detect
a list *without* using a library.  Wasn't it you who told me we
should use a library to *avoid* inventing our own code?  So if
you have this code which works perfectly on the input I'm
suggesting since two weeks why you want to add an additional library
on top of this.  I feel a little bit bored by this discussion which
is running several circles starts to become personal without any
real reason (I hope I did not gave any) and finally leads to nothing
(at least this is my impression).

enclose lists in blank lines because people will tell you that
this will look ugly in the existing interfaces.  So I would rather
tend to "No for both" and this is the crux here.

       Frankly, I think this is very wrong.

The solution does not work without the code you wrote above.  But you
need this code anyway to detect lists in the long descriptions and so
I wonder where the real profit of an additional library is.

       Is the above algorithm proof enough for you? Or do I have to
write that into real code in your favourite porogramming language
before you can see it?

I hope you would not code the bug in line no. 9.

What you basically tried to prove is that you are keen on teaching your
fellow developers programming.  Your time would be much better spend if
you would bring the effort forward to finally reach a consensus how we
should change best practices for debian/control to enable the parsing
of list.  My suggestions I presented [1] are not in contrast to markdown
and what you finally are using for the description parsing tools -
the algorithm above or a library on top of it - does not matter at all
if we agree to some simple standard.

It would be really helpful if you would return to the constructive way
of discussion I observed in former times instead of bluring the issue
with distracting discussions.

Kind regards

      Andreas.

[1] http://lists.debian.org/debian-devel/2009/04/msg00643.html


--
http://fam-tille.de


Reply to: