Skip to content

Commit 80fdb7b

Browse files
committed
Fix edge case when period is after bold marker
1 parent 58d5b81 commit 80fdb7b

File tree

1 file changed

+2
-2
lines changed
  • lib/node_modules/@stdlib/_tools/bib/citation-reference/lib

1 file changed

+2
-2
lines changed

lib/node_modules/@stdlib/_tools/bib/citation-reference/lib/transform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var SMART_SINGLE_QUOTES = /[\u2018\u2019\u201A\u201B]/g;
3030
var ITALIC_START = / \*/g;
3131
var ITALIC_END = /\*([ .])/g;
3232
var BOLD_START = / __/g;
33-
var BOLD_END = /__ /g;
33+
var BOLD_END = /__([ .])/g;
3434
var TMP_START = /{{REPLACE_ITALIC_START}}/g;
3535
var TMP_END = /{{REPLACE_ITALIC_END}}([ .])/g;
3636

@@ -60,7 +60,7 @@ function transform( raw ) {
6060

6161
// Replace `__` markers indicating strong with `**`:
6262
raw = replace( raw, BOLD_START, ' **' );
63-
raw = replace( raw, BOLD_END, '** ' );
63+
raw = replace( raw, BOLD_END, '**$1' );
6464

6565
// Replace temporary place holders with `_` to indicate emphasis:
6666
raw = replace( raw, TMP_START, ' _' );

0 commit comments

Comments
 (0)