Skip to content

Commit 8e52120

Browse files
tmadeirascriptcoded
authored andcommitted
fix: change number regex to not use lookbehind (#106)
1 parent 7340f22 commit 8e52120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const highlighters = [
3939
},
4040
{
4141
name: 'number',
42-
regex: /((?<![a-zA-z])\d+(?:\.\d+)?)/g
42+
regex: /(\b\d+(?:\.\d+)?)/g
4343
},
4444
{
4545
name: 'string',

0 commit comments

Comments
 (0)