fix: overeager match patterns for chapter ranges

This commit is contained in:
tomasklaen
2022-09-22 22:10:21 +02:00
parent ac5fd9cc03
commit 1df7a47005

View File

@@ -840,8 +840,8 @@ function serialize_chapter_ranges(normalized_chapters)
local ranges = {}
local chapters = {}
local simple_ranges = {
{name = 'openings', patterns = {'^op', '^op$', 'op$', 'opening$', '^intro$'}, requires_next_chapter = true},
{name = 'endings', patterns = {'^ed', '^ed$', 'ed$', 'ending$', '^outro$'}},
{name = 'openings', patterns = {'^op ', '^op$', ' op$', 'opening$', '^intro$'}, requires_next_chapter = true},
{name = 'endings', patterns = {'^ed ', '^ed$', ' ed$', 'ending$', '^outro$'}},
}
for i, normalized_chapter in ipairs(normalized_chapters) do