Merge pull request #24266 from JoaoAlvaroFerreira/master

Fixes docs displaying error if xml has parentheses after brackets
This commit is contained in:
Rémi Verschelde 2018-12-11 14:07:07 +01:00 committed by GitHub
commit 244cc11edd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -280,7 +280,7 @@ def rstize_text(text, cclass):
escape_post = True
# Properly escape things like `[Node]s`
if escape_post and post_text and post_text[0].isalnum(): # not punctuation, escape
if escape_post and post_text and (post_text[0].isalnum() or post_text[0] == "("): # not punctuation, escape
post_text = '\ ' + post_text
next_brac_pos = post_text.find('[', 0)