Skip to content

Commit 525dd97

Browse files
committed
lightbox: Restart imgCount each time the filter is invoked.
This allows to get reproducible output when running the filter multiple times.
1 parent d576607 commit 525dd97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/resources/filters/layout/lightbox.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,11 @@ function lightbox()
176176
return {{
177177
traverse = "topdown",
178178

179-
Meta = function(meta)
179+
Meta = function(meta)
180180
-- Set auto lightbox mode, if need be
181181
auto = lightbox_module.automatic(meta) == true
182-
end,
182+
imgCount = 0
183+
end,
183184
-- Find images that are already within links
184185
-- we'll use this to filter out these images if
185186
-- the most is auto

0 commit comments

Comments
 (0)