From patchwork Thu Mar 30 03:19:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,3] minirst: remove "admonition" from _admonitions From: Gregory Szorc X-Patchwork-Id: 19838 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 29 Mar 2017 20:19:41 -0700 # HG changeset patch # User Gregory Szorc # 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. 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',