Skip to content

Commit

Permalink
Footnotes: fix wrong link when adding more than 9 footnotes
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jan 5, 2024
1 parent c804a69 commit 59cec40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core-data/src/footnotes/index.js
Original file line number Diff line number Diff line change
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 59cec40

Please sign in to comment.