chiark / gitweb /
man: drop rhs parts in snippets in directive index
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Feb 2013 02:31:02 +0000 (21:31 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 Feb 2013 02:55:00 +0000 (21:55 -0500)
-       --exit-if-exists=file
+       --exit-if-exists=
etc.

make-directive-index.py

index 15bd9b9..c61383b 100755 (executable)
@@ -185,7 +185,10 @@ def _extract_directives(directive_groups, formatting, page):
                 stor[text].append((pagename, section))
                 if text not in formatting:
                     # use element as formatted display
-                    name.tail = ''
+                    if name.text[-1] in '= ':
+                        name.clear()
+                    else:
+                        name.tail = ''
                     name.text = text
                     formatting[text] = name