From 1a617ddf2ee44e116a97e1bc0168af22a87d2102 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Fri, 3 Feb 2017 22:02:12 +0800 Subject: [PATCH] Fix duplicated headers anchor link not been updated properly --- public/js/extra.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/extra.js b/public/js/extra.js index 16235669b..a3e840d29 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -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); }