Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Nov 20, 2017
1 parent 7f7f106 commit 5f06d72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mistune.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import re
import inspect

__version__ = '0.8'
__version__ = '0.8.1'
__author__ = 'Hsiaoming Yang <me@lepture.com>'
__all__ = [
'BlockGrammar', 'BlockLexer',
Expand Down Expand Up @@ -48,7 +48,8 @@ def _pure_pattern(regex):


def _keyify(key):
return _key_pattern.sub(' ', key.lower())
key = escape(key.lower(), quote=True)
return _key_pattern.sub(' ', key)


def escape(text, quote=False, smart_amp=True):
Expand Down Expand Up @@ -445,7 +446,8 @@ class InlineGrammar(object):
inline_html = re.compile(
r'^(?:%s|%s|%s)' % (
r'<!--[\s\S]*?-->',
r'<(\w+%s)((?:%s)*?)\s*>([\s\S]*?)<\/\1>' % (_valid_end, _valid_attr),
r'<(\w+%s)((?:%s)*?)\s*>([\s\S]*?)<\/\1>' % (
_valid_end, _valid_attr),
r'<\w+%s(?:%s)*?\s*\/?>' % (_valid_end, _valid_attr),
)
)
Expand Down

0 comments on commit 5f06d72

Please sign in to comment.