From 59cec40556d97dddece6d0450fc52aeb5fd0abcd Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Fri, 5 Jan 2024 21:59:22 +0900 Subject: [PATCH] Footnotes: fix wrong link when adding more than 9 footnotes --- packages/core-data/src/footnotes/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/core-data/src/footnotes/index.js b/packages/core-data/src/footnotes/index.js index 9458290f9cb40..b80ba65d142ed 100644 --- a/packages/core-data/src/footnotes/index.js +++ b/packages/core-data/src/footnotes/index.js @@ -75,6 +75,14 @@ export function updateFootnotesFromMeta( blocks, meta ) { html: replacement.innerHTML, } ); countValue.text = String( index + 1 ); + countValue.formats = Array.from( + { length: countValue.text.length }, + () => countValue.formats[ 0 ] + ); + countValue.replacements = Array.from( + { length: countValue.text.length }, + () => countValue.replacements[ 0 ] + ); replacement.innerHTML = toHTMLString( { value: countValue, } );