mirror of https://github.com/perkeep/perkeep.git
6c231339dc
russross/blackfriday (BSD license, version 8cec3a8) parses and converts markdown to HMTL. shurcooL/sanitized_anchor_name (MIT license, version 11a20b7) generates anchor names for HTML headings. Change-Id: I475ec76a1a252354071abfbe2d9c97b234144b3e |
||
---|---|---|
.. | ||
README.md | ||
main.go | ||
main_test.go |
README.md
sanitized_anchor_name
Package sanitized_anchor_name
provides a func to create sanitized anchor names.
Its logic can be reused by multiple packages to create interoperable anchor names and links to those anchors.
At this time, it does not try to ensure that generated anchor names are unique, that responsibility falls on the caller.
Example
anchorName := sanitized_anchor_name.Create("This is a header")
fmt.Println(anchorName)
// Output:
// this-is-a-header