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

markdown

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Overview

Package markdown 把 OFD 页面渲染成 Markdown(GFM)。

版面结构推断——标题层级、正文基准字号、段落边界、页码行、表格识别——在 internal/textdoc,与 DOCX 共用同一套判定;本包只负责把文字行编排成 Markdown 结构并处理 GFM 转义。表格识别默认由调用方关闭,误判成表格的代价比漏判高。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeLine

func EscapeLine(line string) string

EscapeLine 转义一行 Markdown 文本:转义表格特殊字符,并给会被解析成块级 标记的行首字符与有序列表序号补反斜杠。

func RenderPage

func RenderPage(markdown *strings.Builder, entries []textdoc.Entry, pageHeight float64, detectTables bool)

func RenderTable

func RenderTable(markdown *strings.Builder, table textdoc.Table)

RenderTable 按 GFM 语法输出表格,表头为第一行。

Types

This section is empty.

Jump to

Keyboard shortcuts

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