mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-04 14:37:24 +02:00
Better use of Python regex facilities.
This commit is contained in:
@@ -52,7 +52,7 @@ def gallery(force):
|
||||
if os.path.isfile(document):
|
||||
with open(document, 'rt') as readme:
|
||||
for line in readme.readlines():
|
||||
match = re.match(r"^.*!(\[.*\]\(.*\)).*$", line)
|
||||
match = re.search(r"!(\[.*\]\(.*\))", line)
|
||||
if match:
|
||||
image = match.group(0)
|
||||
if image.startswith(':
|
||||
|
Reference in New Issue
Block a user