Skip to content

Commit aca376b

Browse files
committed
fix: Underscore should not be parsed inside word #56
1 parent 1a34159 commit aca376b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

examples/languages/test.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,12 @@ An [example](http://example.com). <http://example.com>
6464
Inline code (should start here: `await session.close()`) ended here [12][6]
6565

6666
Another inline code: `any`
67+
68+
This is a function_name. Another_One.
69+
70+
Same for__double under__scores
71+
72+
Within a word*italic*should written like this.
73+
74+
And the**bold**like this.
75+

src/languages/md.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default [
3131
},
3232
{
3333
type: 'kwd',
34-
match: /_[^_]*_|\*[^*]*\*/g
34+
match: /\b_[^_]*_\b|\*[^*]*\*/g
3535
},
3636
{
3737
type: 'kwd',

0 commit comments

Comments
 (0)