Skip to content

Commit

Permalink
alternative instead of lookbehind
Browse files Browse the repository at this point in the history
  • Loading branch information
Antasel committed Aug 21, 2023
1 parent ae43d20 commit 9d17f89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ExpensiMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ export default class ExpensiMark {
{
name: 'autoEmail',
regex: new RegExp(
`(?![^<]*>|[^<>]*<\\/(?!em))(?:(?<=[^\\w'#%+-])|^)${CONST.REG_EXP.MARKDOWN_EMAIL}(?!((?:(?!<a).)+)?<\\/a>|[^<]*(<\\/pre>|<\\/code>))`,
`(?![^<]*>|[^<>]*<\\/(?!em))([^\\w'#%+-]|^|<em>)${CONST.REG_EXP.MARKDOWN_EMAIL}(?!((?:(?!<a).)+)?<\\/a>|[^<]*(<\\/pre>|<\\/code>))`,
'gim',
),
replacement: '<a href="mailto:$1">$1</a>',
replacement: '$1<a href="mailto:$2">$2</a>',
},

{
Expand Down

0 comments on commit 9d17f89

Please sign in to comment.