mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
kolnovel: avoid removing chapter number if it's inside parentheses
This commit is contained in:
@@ -164,8 +164,12 @@ class DefaultExtension extends MProvider {
|
|||||||
if (title.includes(name)) title = title.replace(name, "").trim();
|
if (title.includes(name)) title = title.replace(name, "").trim();
|
||||||
|
|
||||||
const numMatch = num.match(/(?:الفصل|chapter)\s+(\d+(?:\.\d+)?)/i);
|
const numMatch = num.match(/(?:الفصل|chapter)\s+(\d+(?:\.\d+)?)/i);
|
||||||
if (numMatch)
|
if (numMatch) {
|
||||||
title = title.replace(numMatch[0], "").replace(numMatch[1], "").trim();
|
title = title.replace(numMatch[0], "").trim();
|
||||||
|
if (!title.includes(`(${numMatch[1]})`)) {
|
||||||
|
title = title.replace(numMatch[1], "").trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
title = title.replace(/\s{2,}/g, " ").trim();
|
title = title.replace(/\s{2,}/g, " ").trim();
|
||||||
const finalName =
|
const finalName =
|
||||||
|
|||||||
Reference in New Issue
Block a user