markdown

package
v0.1.4 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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