summaryrefslogtreecommitdiffci
path: root/internal/lightgallery/parser.go
diff options
from:
to:
context:
space:
mode:
Diffstat (limited to 'internal/lightgallery/parser.go')
-rw-r--r--internal/lightgallery/parser.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/lightgallery/parser.go b/internal/lightgallery/parser.go
index 2c10c01..78e2229 100644
--- a/internal/lightgallery/parser.go
+++ b/internal/lightgallery/parser.go
@@ -2,6 +2,7 @@ package lightgallery
import (
"bytes"
+ "log/slog"
"regexp"
"strings"
"time"
@@ -33,11 +34,13 @@ func (p *LightGalleryParser) Open(parent ast.Node, reader text.Reader, pc parser
trimmed := bytes.TrimSpace(line)
parts := r.FindSubmatch(trimmed)
if len(parts) < 2 {
+ slog.Warn("invalid gallery header format", slog.String("line", string(trimmed)), slog.Int("submatch_count", len(parts)))
return nil, parser.NoChildren
}
loc, err := time.LoadLocation(string(parts[1]))
if err != nil {
+ slog.Warn("invalid location specified for a gallery", slog.String("line", string(trimmed)), slog.String("location", string(parts[1])))
return nil, parser.NoChildren
}