Skip to content

Commit

Permalink
test: Add emoji handling test
Browse files Browse the repository at this point in the history
  • Loading branch information
13rac1 committed Dec 19, 2020
1 parent 18ba9d0 commit 9eb1067
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions wikilink.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type wikilinksParser struct {
type linkNormalizer struct{}

func (t *linkNormalizer) Normalize(linkText string) string {
// Note: This escapes emoji 😁 => %F0%9F%98%81
return url.PathEscape(linkText) + ".html"
}

Expand Down
6 changes: 6 additions & 0 deletions wikilinks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ get the <em>full set</em> of text in my tracker.</p>
//- - - - - - - - -//
<p><a href="Multiple.html">Multiple</a> <a href="Wikilinks.html">Wikilinks</a></p>
//= = = = = = = = = = = = = = = = = = = = = = = =//
10
//- - - - - - - - -//
[[😁]]
//- - - - - - - - -//
<p><a href="%F0%9F%98%81.html">😁</a></p>
//= = = = = = = = = = = = = = = = = = = = = = = =//

0 comments on commit 9eb1067

Please sign in to comment.