Skip to content

Commit

Permalink
Footnotes: fix wrong link when adding more than 9 footnotes (#57599)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jan 6, 2024
1 parent fa12531 commit ffbc300
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core-data/src/footnotes/index.js
Expand Up @@ -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,
} );
Expand Down

0 comments on commit ffbc300

Please sign in to comment.