Fix fragment name

This commit is contained in:
Matt Bierner
2017-12-12 18:12:57 -08:00
parent 2652b3f9b8
commit 6ccc79823d

View File

@@ -219,8 +219,8 @@
while (node) {
if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) {
if (node.href.startsWith('file://')) {
const [path, frag] = node.href.replace(/^file:\/\//i, '').split('#');
postMessage('_markdown.openDocumentLink', { path, frag });
const [path, fragment] = node.href.replace(/^file:\/\//i, '').split('#');
postMessage('_markdown.openDocumentLink', { path, fragment });
event.preventDefault();
event.stopPropagation();
break;