Skip to content

Commit

Permalink
Merge pull request #681 from tienifr/fix/38522
Browse files Browse the repository at this point in the history
fix bold markdown display incorrectly
  • Loading branch information
Hayata Suenaga authored Apr 10, 2024
2 parents 5543f9a + 863db97 commit c2df007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ExpensiMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export default class ExpensiMark {
// \B will match everything that \b doesn't, so it works
// for * and ~: https://www.rexegg.com/regex-boundaries.html#notb
name: 'bold',
regex: /\B\*((?![\s*])[\s\S]*?[^\s*])\*\B(?![^<]*(<\/pre>|<\/code>|<\/a>))/g,
regex: /\B\*(?![^<]*(?:<\/pre>|<\/code>|<\/a>))((?![\s*])[\s\S]*?[^\s*])\*\B(?![^<]*(<\/pre>|<\/code>|<\/a>))/g,
replacement: (match, g1) => (g1.includes('</pre>') || this.containsNonPairTag(g1) ? match : `<strong>${g1}</strong>`),
},
{
Expand Down

0 comments on commit c2df007

Please sign in to comment.