From 652bf4f54231f6e65ff9be68941db80ed499494a Mon Sep 17 00:00:00 2001 From: Rick Zhou Date: Sat, 23 Nov 2019 01:07:19 -0800 Subject: [PATCH] fix wbr in the middle of = --- src/lib/output/helpers/wbr.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/output/helpers/wbr.ts b/src/lib/output/helpers/wbr.ts index a20a8c753..10968e34f 100644 --- a/src/lib/output/helpers/wbr.ts +++ b/src/lib/output/helpers/wbr.ts @@ -12,6 +12,8 @@ export function wbr(options: any): Handlebars.SafeString { let str = typeof options === 'string' ? options : options.fn(this); str = Handlebars.escapeExpression(str); + str = str.replace(/=/g, '='); // because 3D would be converted to 3D, use decimal format instead + str = str.replace(/([^_\-][_\-])([^_\-])/g, (m: string, a: string, b: string) => a + '' + b); str = str.replace(/([^A-Z])([A-Z][^A-Z])/g, (m: string, a: string, b: string) => a + '' + b);