diff --git a/convert.py b/convert.py index 2e832ef..e968d68 100644 --- a/convert.py +++ b/convert.py @@ -45,7 +45,7 @@ # Patterns tried in order; first match wins _SLUG_PATTERNS: list[tuple[str, re.Pattern]] = [ # PublicationName-YYYY-MM[...].pdf → YYYY-MM - ("year-month", re.compile(r".*?[_-](\d{4})[_-](\d{2})(?:[_-]|\.|$)", re.IGNORECASE)), + ("year-month", re.compile(r".*?[ _-](\d{4})[_-](\d{2})(?:[_-]|\.|$)", re.IGNORECASE)), # Vol-N or Volume-N → vol-N (bare V excluded: too ambiguous, e.g. _v2 meaning version 2) ("volume", re.compile(r"(?:Vol(?:ume)?)[_\-\.\s]?(\d+)", re.IGNORECASE)), # No-N or Issue-N → no-N