You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
930 B

  1. sanitized_anchor_name
  2. =====================
  3. [![Build Status](https://travis-ci.org/shurcooL/sanitized_anchor_name.svg?branch=master)](https://travis-ci.org/shurcooL/sanitized_anchor_name) [![GoDoc](https://godoc.org/github.com/shurcooL/sanitized_anchor_name?status.svg)](https://godoc.org/github.com/shurcooL/sanitized_anchor_name)
  4. Package sanitized_anchor_name provides a func to create sanitized anchor names.
  5. Its logic can be reused by multiple packages to create interoperable anchor names and links to those anchors.
  6. At this time, it does not try to ensure that generated anchor names are unique, that responsibility falls on the caller.
  7. Installation
  8. ------------
  9. ```bash
  10. go get -u github.com/shurcooL/sanitized_anchor_name
  11. ```
  12. Example
  13. -------
  14. ```Go
  15. anchorName := sanitized_anchor_name.Create("This is a header")
  16. fmt.Println(anchorName)
  17. // Output:
  18. // this-is-a-header
  19. ```
  20. License
  21. -------
  22. - [MIT License](LICENSE)