~netlandish/django-wiki

76a3532b870d596e05de52169279874f4a86820a — benjaoming 11 years ago f0c3458
rm dupe lines
1 files changed, 0 insertions(+), 6 deletions(-)

M wiki/plugins/macros/markdown_extensions.py
M wiki/plugins/macros/markdown_extensions.py => wiki/plugins/macros/markdown_extensions.py +0 -6
@@ 12,12 12,6 @@ re_sq_short = r"'([^'\\]*(?:\\.[^'\\]*)*)'"
MACRO_RE = re.compile(r'.*(\[(?P<macro>\w+)(?P<kwargs>\s\w+\:.+)*\]).*', re.IGNORECASE)
KWARG_RE = re.compile(r'\s*(?P<arg>\w+)(:(?P<value>([^\']+|%s)))?' % re_sq_short, re.IGNORECASE)

# See: http://stackoverflow.com/questions/430759/regex-for-managing-escaped-characters-for-items-like-string-literals
re_sq_short = r"'([^'\\]*(?:\\.[^'\\]*)*)'"

MACRO_RE = re.compile(r'.*(\[(?P<macro>%s)(?P<kwargs>\s\w+\:.+)*\]).*', re.IGNORECASE)
KWARG_RE = re.compile(r'\s*(?P<arg>\w+)(:(?P<value>([^\']|%s)))?' % re_sq_short, re.IGNORECASE)

class SimplePreprocessorExtension(markdown.Extension):
    """Extend this class to create a simple [name arg:val] markdown tag 
    and replace each tag with your own html stack"""