Help us shape the future of Go! Take the 2026 Go Developer Survey

pagemark

package
v1.11.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package pagemark is the one place that knows how the pages of a document are marked in the markdown that goes to the chunkers.

A PDF is read page by page, and a chunk must be able to say which pages it comes from (for a citation, or to open the page). The text that is indexed therefore has, before the text of each page, a line that an HTML comment makes invisible to anyone who renders the markdown:

<!-- page 3 -->

The chunkers read these lines, take them out of the text, and put the pages a chunk covers in its metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marker

func Marker(page int) string

Marker is the line that starts page n (counting from 1).

func Parse

func Parse(line string) (int, bool)

Parse says whether a line is a page marker, and which page it starts.

func Strip

func Strip(markdown string) string

Strip takes the page markers out of a markdown text, and the blank line that follows each.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL