1
0
mirror of https://github.com/koloml/philomena-tagging-assistant.git synced 2026-06-23 18:22:20 +00:00

Reversed + conversion with dash-encoded characters conversion

This way encoded `+` character will properly decode after other `+` were
dealt with
This commit is contained in:
2026-06-13 22:01:14 +04:00
parent f01bfe8ae0
commit 736c0917c0

View File

@@ -101,8 +101,8 @@ export function resolveTagNameFromLink(tagLink: URL): string | null {
}
return decodeURIComponent(encodedTagName)
.replaceAll(/-[a-z]+-/gi, match => slugEncodedCharacters.get(match) ?? match)
.replaceAll('+', ' ');
.replaceAll('+', ' ')
.replaceAll(/-[a-z]+-/gi, match => slugEncodedCharacters.get(match) ?? match);
}
/**