Fix duplicated headers anchor link not been updated properly

This commit is contained in:
Wu Cheng-Han 2017-02-03 22:02:12 +08:00
parent 7863eec366
commit 1a617ddf2e
1 changed files with 1 additions and 1 deletions

View File

@ -833,7 +833,7 @@ export function deduplicatedHeaderId(view) {
const newId = id + j;
const $duplicatedHeader = $(duplicatedHeaders[j]);
$duplicatedHeader.attr('id', newId);
const $headerLink = $duplicatedHeader.find('> .header-link');
const $headerLink = $duplicatedHeader.find(`> a.anchor[href="#${id}"]`);
$headerLink.attr('href', `#${newId}`);
$headerLink.attr('title', newId);
}