toggle preformatted mode
This commit is contained in:
parent
6bbe75ba3d
commit
ac377b5c0f
5
links.py
5
links.py
|
@ -26,8 +26,11 @@ for filename in os.listdir():
|
||||||
|
|
||||||
# open file and search for all outgoing links
|
# open file and search for all outgoing links
|
||||||
file = open(filename)
|
file = open(filename)
|
||||||
|
pre_mode = False
|
||||||
for line in file:
|
for line in file:
|
||||||
if re.match("%",line) != None: # skip uxn macros (!)
|
if re.match("```",line) != None: # toggle preformatted mode
|
||||||
|
pre_mode = not pre_mode
|
||||||
|
if pre_mode: # skip preformatted mode
|
||||||
continue
|
continue
|
||||||
m=re.search("\{.+\}",line)
|
m=re.search("\{.+\}",line)
|
||||||
if m:
|
if m:
|
||||||
|
|
Loading…
Reference in New Issue