|
|
@ -60,7 +60,7 @@ function process_inlines(tokens, state) { |
|
|
|
} else { |
|
|
|
for (j = i - 1; j >= 0; j--) { |
|
|
|
if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // lastChar defaults to 0x20
|
|
|
|
if (tokens[j].type !== 'text') continue; |
|
|
|
if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'
|
|
|
|
|
|
|
|
lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1); |
|
|
|
break; |
|
|
@ -77,7 +77,7 @@ function process_inlines(tokens, state) { |
|
|
|
} else { |
|
|
|
for (j = i + 1; j < tokens.length; j++) { |
|
|
|
if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break; // nextChar defaults to 0x20
|
|
|
|
if (tokens[j].type !== 'text') continue; |
|
|
|
if (!tokens[j].content) continue; // should skip all tokens except 'text', 'html_inline' or 'code_inline'
|
|
|
|
|
|
|
|
nextChar = tokens[j].content.charCodeAt(0); |
|
|
|
break; |
|
|
|