Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-04 19:32:54 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-04 19:32:54 +0300
commitec3754bd94eaa3aa3c5410ee6ab100bb27bfb798 (patch)
treed0446a967a4f8cbc3208d48d6bf3d9b7c90ca25e /sphinx/roles.py
parentb268963709dc9256cf711d4cc054a86e70226702 (diff)
parent9fd9edebb47a3a5eda8c6065b12b71cdb0985a73 (diff)
Merge branch '3.x'
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r--sphinx/roles.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/roles.py b/sphinx/roles.py
index 7bb7ac5e2..426a62e90 100644
--- a/sphinx/roles.py
+++ b/sphinx/roles.py
@@ -331,14 +331,15 @@ class Abbreviation(SphinxRole):
abbr_re = re.compile(r'\((.*)\)$', re.S)
def run(self) -> Tuple[List[Node], List[system_message]]:
+ options = self.options.copy()
matched = self.abbr_re.search(self.text)
if matched:
text = self.text[:matched.start()].strip()
- self.options['explanation'] = matched.group(1)
+ options['explanation'] = matched.group(1)
else:
text = self.text
- return [nodes.abbreviation(self.rawtext, text, **self.options)], []
+ return [nodes.abbreviation(self.rawtext, text, **options)], []
specific_docroles = {