1
0
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:
Chris Palmer
2020-12-30 09:48:46 +00:00
parent 8f2532d61b
commit 46937e403e
3 changed files with 3 additions and 7 deletions

View File

@@ -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('![Main Assembly](assemblies/'):