shurcooL/sanitized_anchor_name

GitHub: shurcooL/sanitized_anchor_name

一个 Go 库,提供将文本转换为规范化锚点名称(slug)的函数,供 Markdown 渲染等场景复用。

Stars: 27 | Forks: 8

# sanitized_anchor_name [![Go 参考](https://pkg.go.dev/badge/github.com/shurcooL/sanitized_anchor_name.svg)](https://pkg.go.dev/github.com/shurcooL/sanitized_anchor_name) Package sanitized_anchor_name 提供了一个用于创建经过处理的 anchor 名称的函数。 其逻辑可被多个包重用,以创建可互操作的 anchor 名称 以及指向这些 anchor 的链接。 目前,它并不尝试确保生成的 anchor 名称 是唯一的,该责任由调用方承担。 ## 安装 ``` go get github.com/shurcooL/sanitized_anchor_name ``` ## 示例 ``` anchorName := sanitized_anchor_name.Create("This is a header") fmt.Println(anchorName) // Output: // this-is-a-header ``` ## 许可证 - [MIT 许可证](LICENSE)
标签:EVTX分析, 日志审计