Patchwork [2,of,3] minirst: remove "admonition" from _admonitions

login
register
mail settings
Submitter Gregory Szorc
Date March 30, 2017, 3:19 a.m.
Message ID <c4329b811738046b7066.1490843981@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/19838/
State Accepted
Headers show

Comments

Gregory Szorc - March 30, 2017, 3:19 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1490843118 25200
#      Wed Mar 29 20:05:18 2017 -0700
# Node ID c4329b811738046b70661f5647df50d7d28b2362
# Parent  f4e8bf5a118604478b371473f7b610f8252d9752
minirst: remove "admonition" from _admonitions

The "admonition" rst primitive is split into "specific" admonitions
("attention," "caution," etc) and the "generic" admonition
("admonition"). For more, see
http://docutils.sourceforge.net/docs/ref/rst/directives.html#admonitions

The _admonitions set and keys of the _admonitiontitles dict
overlap exactly except _admonitions has an "admonition" entry.
Nowhere in Mercurial is the "admonition" admonition directive used.
Even if it were, it doesn't have a title, so it wouldn't be rendered
correctly.

So, let's remove "admonition" from the set of recognized admonition
directives.

Patch

diff --git a/mercurial/minirst.py b/mercurial/minirst.py
--- a/mercurial/minirst.py
+++ b/mercurial/minirst.py
@@ -414,7 +414,6 @@  def prunecomments(blocks):
 
 
 _admonitions = set([
-    'admonition',
     'attention',
     'caution',
     'danger',