@samitouri / QOSami-HFS / commits / 05e89fd7

accept lang files with shorter name #778

Massimo Melina committed Oct 17, 2024 at 20:27 UTC 05e89fd786e12990a44260da284c40b54cb5da16
1 file changed +1 -1
src/lang.ts
+1 -1
@@ -17,7 +17,7 @@ export function code2file(code: string) {
17 }
18
19 export function file2code(fn: string) {
20 - return fn.slice(PREFIX.length, -SUFFIX.length)
20 + return fn.replace(PREFIX, '').replace(SUFFIX, '')
21 }
22
23 export async function getLangData(ctx: Koa.Context) {