Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 437e114

Browse files
committed
fix: include directive flags in regex search
Signed-off-by: oleg.hoefling <[email protected]>
1 parent 03e7d6a commit 437e114

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docstring_to_markdown/rst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def looks_like_rst(value: str) -> bool:
339339
if (section + '\n' + '-' * len(section) + '\n') in value:
340340
return True
341341
for directive in RST_DIRECTIVES:
342-
if re.search(directive.pattern, value):
342+
if re.search(directive.pattern, value, directive.flags):
343343
return True
344344
# allow "text::" or "text ::" but not "^::$" or "^:::$"
345345
return bool(re.search(r'(\s|\w)::\n', value) or '\n>>> ' in value)

0 commit comments

Comments
 (0)