From e16bb80a96b41e69d2bf307ae8920f2f8fc70765 Mon Sep 17 00:00:00 2001 From: grubert Date: Sun, 5 May 2024 11:33:37 +0000 Subject: [PATCH] manpage writer: Remove code for unused emdash bullets. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@9686 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/HISTORY.txt | 2 ++ docutils/docutils/writers/manpage.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt index 4fb7e7cc9..47afa6373 100644 --- a/docutils/HISTORY.txt +++ b/docutils/HISTORY.txt @@ -32,7 +32,9 @@ Release 0.22b.dev (unpublished) - Adapt `DocInfo` to fixed element categories. +* docutils/writers/manpage.py + - Remove code for unused emdash bullets. Release 0.21.2 (2024-04-23) =========================== diff --git a/docutils/docutils/writers/manpage.py b/docutils/docutils/writers/manpage.py index 426751530..464b7df2a 100644 --- a/docutils/docutils/writers/manpage.py +++ b/docutils/docutils/writers/manpage.py @@ -315,7 +315,6 @@ class Translator(nodes.NodeVisitor): class EnumChar: enum_style = { 'bullet': '\\(bu', - 'emdash': '\\(em', } def __init__(self, style): @@ -342,8 +341,6 @@ class Translator(nodes.NodeVisitor): def __next__(self): if self._style == 'bullet': return self.enum_style[self._style] - elif self._style == 'emdash': - return self.enum_style[self._style] self._cnt += 1 # TODO add prefix postfix if self._style == 'arabic': @@ -367,6 +364,8 @@ class Translator(nodes.NodeVisitor): if 'enumtype' in node: self._list_char.append(EnumChar(node['enumtype'])) else: + # INFO node['bullet'] contains the bullet style "*+-" + # BUT man pages only use "*". self._list_char.append(EnumChar('bullet')) if len(self._list_char) > 1: # indent nested lists -- 2.11.4.GIT