Skip to content

Commit 652bf4f

Browse files
rinickGerrit0
authored andcommitted
fix wbr in the middle of =
1 parent fe2363c commit 652bf4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/output/helpers/wbr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export function wbr(options: any): Handlebars.SafeString {
1212
let str = typeof options === 'string' ? options : options.fn(this);
1313
str = Handlebars.escapeExpression(str);
1414

15+
str = str.replace(/&#x3D;/g, '&#61;'); // because 3D would be converted to 3<wbr>D, use decimal format instead
16+
1517
str = str.replace(/([^_\-][_\-])([^_\-])/g, (m: string, a: string, b: string) => a + '<wbr>' + b);
1618
str = str.replace(/([^A-Z])([A-Z][^A-Z])/g, (m: string, a: string, b: string) => a + '<wbr>' + b);
1719

0 commit comments

Comments
 (0)