Subject: [BUG] in asciidoc was Re: [FILES] core-git documentation update

From: David Greaves <[email-masked]>
Date: Sun, 08 May 2005 22:25:36 +0100

Junio C Hamano wrote:

>>>>>>"DG" == David Greaves <[email-masked]> writes:
>>>>>>            
>>>>>>
>
>DG> it just makes across the board changes easier and at the minute the
>DG> stuff I've been doing is systemic.
>DG> I have no problems with breaking it up - hence the script...
>
>Monolithic version is easier to work with when there is only one
>or very few people working on it but when the document matures
>enough to describe the current state of affairs accurately
>enough, further changes would come almost solely from changing
>the programs the document describes.  At that point having
>separate files describing each program is easier to work with,
>and I think that point is now.
>  
>
I was waiting for comments on this set in case there were comments like:
every document should have 'x' or change all 'y' to 'z'
I fully intend to split it out...

I will send patches next time.

One thing I failed to mention.
There's a minor bug in asciidoc for which I've submitted a patch to the
author. IIRC the bug causes problems with the -man option and is
cosmetically wrong with the html.

>>From the asciidoc docs:
The first manpage section is mandatory and must be called /NAME/ and
contain a single paragraph (usually a single line) consisting of a list
of one or more comma separated command name(s) separated from the
command purpose by a dash character. **The dash must have at least one
white space character on either side.**

However this is not enforced (or indeed possible) at the moment - the
NAME section seems to split on the first hyphen.

This patch fixes that for me.

--- /usr/bin/asciidoc.orig      2005-05-08 17:03:42.666249974 +0100
+++ /usr/bin/asciidoc   2005-05-08 16:56:00.518923960 +0100
@@ -1067,7 +1067,7 @@
                     error('malformed NAME section body')
                 lines = reader.read_until(r'^$')
                 s = string.join(lines)
-                mo = re.match(r'^(?P<manname>.*?)-(?P<manpurpose>.*)$',s)
+                mo =
re.match(r'^(?P<manname>.*?)\s+-\s+(?P<manpurpose>.*)$',s)
                 if not mo:
                     error('malformed NAME section body')
                 attrs['manname'] = string.strip(mo.group('manname'))