Skip to content

Commit

Permalink
Document more of how Strip() works
Browse files Browse the repository at this point in the history
  • Loading branch information
thebaer committed Feb 26, 2018
1 parent f212b21 commit 6e12ec3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions strip.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ var (
)

// Strip returns the given string sans any Markdown.
// Where necessary, elements are replaced with their best textual forms, so
// for example, hyperlinks are stripped of their URL and become only the link
// text, and images lose their URL and become only the alt text.
func Strip(s string) string {
res := s
res = listLeadersReg.ReplaceAllString(res, "$1")
Expand Down

0 comments on commit 6e12ec3

Please sign in to comment.