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: 21 Imported by: 0

Documentation

Overview

Package markdown 为 converter 注册 Markdown→OFD 导入器(输入格式 "markdown")。

该包依赖 internal/layout 与 goldmark,单独成包是为了让只做 OFD→X 的使用方 不必链接这些依赖;需要 Markdown→OFD 时按空白导入启用:

import _ "github.com/zc310/ofd/pkg/converter/import/markdown"

之后即可使用 converter.Convert("md", "ofd", ...)。出于安全和确定性考虑, 远程图片不会被下载,只在日志中给出警告。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(input any, output io.Writer) error

Convert 将 Markdown 输入转换为 OFD,input 支持文件路径、[]byte 或 io.Reader。 传入文件路径时会以该文件所在目录解析相对图片路径。

func ConvertFile

func ConvertFile(mdPath, ofdPath string) error

ConvertFile 是 Convert 的按路径便捷形式。

Types

This section is empty.

Jump to

Keyboard shortcuts

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