Skip to content

Commit 7d6a316

Browse files
authored
Revert contentref anchor title (#3767)
1 parent c31e564 commit 7d6a316

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.changeset/fruity-banks-doubt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Revert contentref anchor title

packages/gitbook/src/lib/references.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,7 @@ export async function resolveContentRef(
165165
if (document) {
166166
const block = getBlockById(document, anchor);
167167
if (block) {
168-
// If the anchor points to the current page, we just resolve the text from the block.
169-
// This avoids showing the page title twice.
170-
if (isCurrentPage) {
171-
text = `#${getBlockTitle(block)}`;
172-
} else {
173-
text = `${page.title} #${getBlockTitle(block)}`;
174-
}
168+
text = getBlockTitle(block);
175169
}
176170
}
177171
}

0 commit comments

Comments
 (0)