markdone/markdone-python/markdone_python/common.py

14 lines
361 B
Python

import re
section_pattern = re.compile(r'^#')
tag_pattern = re.compile(r'\![\w_-]+\b')
task_pattern = re.compile(r'^[\s]*[*]?[\s]*\[[ xX]?\]')
if __name__ == '__main__':
print(tag_pattern.findall('Got some !tags !here'))
for m in tag_pattern.finditer('Got some !tags !here'):
import ipdb; ipdb.set_trace() # XXX BREAKPOINT
print(m)