SF.net SVN: docutils:[9710 ] trunk/docutils/docutils/w riters/manpage.py
grubert--- via Docutils-checkins <[email protected]>
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 9710
http://sourceforge.net/p/docutils/code/9710
Author: grubert
Date: 2024-05-17 07:13:11 +0000 (Fri, 17 May 2024)
Log Message:
-----------
shuffle if/elif/else
Modified Paths:
--------------
trunk/docutils/docutils/writers/manpage.py
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2024-05-17 07:06:18 UTC (rev 9709)
+++ trunk/docutils/docutils/writers/manpage.py 2024-05-17 07:13:11 UTC (rev 9710)
@@ -355,17 +355,15 @@
return self.enum_style[self._style]
self._cnt += 1
# TODO add prefix postfix
- if self._style == 'arabic':
- return "%d." % self._cnt
- elif self._style in ('loweralpha', 'upperalpha'):
+ if self._style in ('loweralpha', 'upperalpha'):
return "%c." % self._cnt
- elif self._style.endswith('roman'):
+ if self._style.endswith('roman'):
res = roman.toRoman(self._cnt) + '.'
if self._style.startswith('upper'):
return res.upper()
return res.lower()
- else:
- return "%d." % self._cnt
+ # else 'arabic', ...
+ return "%d." % self._cnt
def get_width(self):
return self._indent
@@ -693,8 +691,7 @@
if self._in_docinfo:
self._field_name = node.astext()
raise nodes.SkipNode
- else:
- self.body.append(self.defs['field_name'][0])
+ self.body.append(self.defs['field_name'][0])
def depart_field_name(self, node):
self.body.append(self.defs['field_name'][1])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.