Fix duplicated headers anchor link not been updated properly
This commit is contained in:
parent
7863eec366
commit
1a617ddf2e
1 changed files with 1 additions and 1 deletions
|
@ -833,7 +833,7 @@ export function deduplicatedHeaderId(view) {
|
||||||
const newId = id + j;
|
const newId = id + j;
|
||||||
const $duplicatedHeader = $(duplicatedHeaders[j]);
|
const $duplicatedHeader = $(duplicatedHeaders[j]);
|
||||||
$duplicatedHeader.attr('id', newId);
|
$duplicatedHeader.attr('id', newId);
|
||||||
const $headerLink = $duplicatedHeader.find('> .header-link');
|
const $headerLink = $duplicatedHeader.find(`> a.anchor[href="#${id}"]`);
|
||||||
$headerLink.attr('href', `#${newId}`);
|
$headerLink.attr('href', `#${newId}`);
|
||||||
$headerLink.attr('title', newId);
|
$headerLink.attr('title', newId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue