From 4504f1097ea87de431da8f4e5d0303f22da2e94e Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Thu, 7 Feb 2019 11:28:52 -0500 Subject: Emphasis pattern treats newlines as whitespace (#785) All whitespace characters should be treated the same by inline patterns. Previoulsy, emphasis patterns were only accounting for spaces, but not other whitepsace characters such as newlines. Fixes #783. --- markdown/inlinepatterns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'markdown') diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index dc502c2..88e8ead 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -144,7 +144,7 @@ REFERENCE_RE = LINK_RE IMAGE_REFERENCE_RE = IMAGE_LINK_RE # stand-alone * or _ -NOT_STRONG_RE = r'((^| )(\*|_)( |$))' +NOT_STRONG_RE = r'((^|\s)(\*|_)(\s|$))' # AUTOLINK_RE = r'<((?:[Ff]|[Hh][Tt])[Tt][Pp][Ss]?://[^>]*)>' -- cgit v1.2.1