MCPcopy
hub / github.com/GitbookIO/gitbook / toPathForPage

Function toPathForPage

packages/gitbook/src/components/PDF/PDFPage.tsx:71–81  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

69 const linker: GitBookLinker = {
70 ...baseContext.linker,
71 toPathForPage(input) {
72 if (pages.some((p) => p.page.id === input.page.id)) {
73 return `#${getPagePDFContainerId(input.page, input.anchor)}`;
74 }
75 if (input.page.type === RevisionPageType.Group) {
76 return '#';
77 }
78
79 // Use an absolute URL to the page
80 return input.page.urls.app;
81 },
82 };
83
84 const context: GitBookSpaceContext = {

Callers

nothing calls this directly

Calls 1

getPagePDFContainerIdFunction · 0.85

Tested by

no test coverage detected