Skip to content

Commit f5ae28d

Browse files
committed
Simplify multi-line and single line rules
1 parent 57cad90 commit f5ae28d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/languages/asciidoc.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,17 @@ export default function(hljs) {
122122
{
123123
begin: /\\[*_`]/
124124
},
125-
// inline constrained strong
125+
// inline contrained string (single line)
126126
{
127127
className: 'strong',
128-
// must not follow a word character or be followed by an asterisk or space
129-
begin: /\B\*(\w\n?\w)+(?!\n\n)/,
130-
end: /\*/,
131-
// allow escaped asterisk followed by word char
132-
contains: [{
133-
begin: '\\\\*\\w',
134-
relevance: 0
135-
}]
128+
// must not precede or follow a word character
129+
begin: /\B\*\w+\*\B/,
130+
},
131+
// inline constrained strong (multi-line)
132+
{
133+
className: 'strong',
134+
// must not precede or follow a word character
135+
begin: /\B\*(\w\n?)*\*/,
136136
},
137137
// inline unconstrained emphasis
138138
{

0 commit comments

Comments
 (0)