Skip to content

Commit

Permalink
Fix backslash munching in domain directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobandersen committed Jun 11, 2019
1 parent eba24eb commit fa82df5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Expand Up @@ -7,6 +7,9 @@ Dependencies
Incompatible changes
--------------------

* #6462: double backslashes in domain directives are no longer replaced by
single backslashes.

Deprecated
----------

Expand All @@ -20,6 +23,7 @@ Bugs fixed
* #1125: html theme: scrollbar is hard to see on classic theme and macOS
* #5502: linkcheck: Consider HTTP 503 response as not an error
* #6439: Make generated download links reproducible
* #6462: keep backslahes in domain directives verbatim

Testing
--------
Expand Down
3 changes: 1 addition & 2 deletions sphinx/directives/__init__.py
Expand Up @@ -92,8 +92,7 @@ def get_signatures(self) -> List[str]:
Backslash-escaping of newlines is supported.
"""
lines = nl_escape_re.sub('', self.arguments[0]).split('\n')
# remove backslashes to support (dummy) escapes; helps Vim highlighting
return [strip_backslash_re.sub(r'\1', line.strip()) for line in lines]
return [line.strip() for line in lines]

def handle_signature(self, sig: str, signode: desc_signature) -> Any:
"""
Expand Down

0 comments on commit fa82df5

Please sign in to comment.