Skip to content

Commit 1a36281

Browse files
committed
Use begin with contains
1 parent fe42ca3 commit 1a36281

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/languages/asciidoc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ export default function(hljs) {
116116
// escaped formatting marks
117117
{
118118
begin: /\\/,
119-
end: /[*_`]/
119+
contains: [{
120+
begin: /[*_`]/,
121+
}]
120122
},
121123
// inline constrained strong
122124
{

test/markup/asciidoc/constrained.expect.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ rd*</span>.
1616
Not a strong *wo
1717

1818
rd*.
19+
20+
\\blah blah <span class="hljs-strong">*blah*</span>.
21+
22+
\\blah blah blah*.

test/markup/asciidoc/constrained.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ rd*.
1616
Not a strong *wo
1717

1818
rd*.
19+
20+
\\blah blah *blah*.
21+
22+
\\blah blah blah*.

0 commit comments

Comments
 (0)