diff --git a/.changeset/fruity-banks-doubt.md b/.changeset/fruity-banks-doubt.md new file mode 100644 index 0000000000..82be5cb98f --- /dev/null +++ b/.changeset/fruity-banks-doubt.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Revert contentref anchor title diff --git a/packages/gitbook/src/lib/references.tsx b/packages/gitbook/src/lib/references.tsx index 917ce95613..e203a7c47f 100644 --- a/packages/gitbook/src/lib/references.tsx +++ b/packages/gitbook/src/lib/references.tsx @@ -165,13 +165,7 @@ export async function resolveContentRef( if (document) { const block = getBlockById(document, anchor); if (block) { - // If the anchor points to the current page, we just resolve the text from the block. - // This avoids showing the page title twice. - if (isCurrentPage) { - text = `#${getBlockTitle(block)}`; - } else { - text = `${page.title} #${getBlockTitle(block)}`; - } + text = getBlockTitle(block); } } }