diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-07-04 19:32:54 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-07-04 19:32:54 +0300 |
commit | ec3754bd94eaa3aa3c5410ee6ab100bb27bfb798 (patch) | |
tree | d0446a967a4f8cbc3208d48d6bf3d9b7c90ca25e /sphinx/roles.py | |
parent | b268963709dc9256cf711d4cc054a86e70226702 (diff) | |
parent | 9fd9edebb47a3a5eda8c6065b12b71cdb0985a73 (diff) |
Merge branch '3.x'
Diffstat (limited to 'sphinx/roles.py')
-rw-r--r-- | sphinx/roles.py | 5 |
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 = { |