Skip to content

Commit 92dcace

Browse files
authored
Merge pull request #209 from sonnyding1/includenodoc_raw_docstring
Fix regex pattern for includenodoc to parse raw docstring
2 parents 01861b0 + 7e42701 commit 92dcace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_sphinx_theme2/custom_directives.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class IncludeDirective(Directive):
3636
has_content = False
3737
add_index = False
3838

39-
docstring_pattern = r'"""(?P<docstring>(?:.|[\r\n])*?)"""\n'
39+
docstring_pattern = r'r?"""(?P<docstring>(?:.|[\r\n])*?)"""\n'
4040
docstring_regex = re.compile(docstring_pattern)
4141

4242
def run(self):

0 commit comments

Comments
 (0)