mirror of https://github.com/status-im/codimd.git
Fix duplicated headers anchor link not been updated properly
This commit is contained in:
parent
7863eec366
commit
1a617ddf2e
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue