mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix #1325 and add test_find_empty_alt
This commit is contained in:
parent
6008f7e2ed
commit
6f9f0def0f
2 changed files with 25 additions and 2 deletions
|
|
@ -584,7 +584,7 @@ def find_empty_alt(content, path):
|
|||
# src before alt
|
||||
<img
|
||||
[^\>]*
|
||||
src=(['"])(.*)\1
|
||||
src=(['"])(.*?)\1
|
||||
[^\>]*
|
||||
alt=(['"])\3
|
||||
)|(?:
|
||||
|
|
@ -593,7 +593,7 @@ def find_empty_alt(content, path):
|
|||
[^\>]*
|
||||
alt=(['"])\4
|
||||
[^\>]*
|
||||
src=(['"])(.*)\5
|
||||
src=(['"])(.*?)\5
|
||||
)
|
||||
""", re.X)
|
||||
for match in re.findall(imgs, content):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue