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.

markdown.go 355B

12345678910111213141516
  1. package common
  2. var MarkdownTextEscape EscapeMap
  3. var MarkdownLinkEscape EscapeMap
  4. func init() {
  5. registerMap := func(eMap EscapeMap, escaped string) {
  6. for _, c := range escaped {
  7. eMap.Set(uint(c), true)
  8. }
  9. }
  10. registerMap(MarkdownTextEscape, "\\!\"#$%&()*+/;<=>?@[]^_`{|}~-")
  11. registerMap(MarkdownLinkEscape, "\\!\"#$%&'()*+,;<=>?@[]^_`{|}~-")
  12. }