Skip to content

Commit 5985598

Browse files
committed
Fix parsing of index terms directly inside parentheses
1 parent b33a89a commit 5985598

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/markdown.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ function parseInlineMeta(state, silent) {
135135
function parseIndexTerm(state, silent) {
136136
let max = state.posMax
137137
// Check for opening '(('
138-
if (state.pos >= max + 4 || state.src.charCodeAt(state.pos) != 40 || state.src.charCodeAt(state.pos + 1) != 40) return false
138+
if (state.pos >= max + 4 || state.src.charCodeAt(state.pos) != 40 || state.src.charCodeAt(state.pos + 1) != 40 ||
139+
state.src.charCodeAt(state.pos + 2) == 40) return false
139140

140141
let start = state.pos + 2, end = start
141142
for (;; end++) {

0 commit comments

Comments
 (0)