From 9eb1067daf68216178aeec7334024de21d72cff9 Mon Sep 17 00:00:00 2001 From: Brad Erickson Date: Sat, 19 Dec 2020 10:07:30 -0800 Subject: [PATCH] test: Add emoji handling test --- wikilink.go | 1 + wikilinks.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/wikilink.go b/wikilink.go index f250aca..6458d65 100644 --- a/wikilink.go +++ b/wikilink.go @@ -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" } diff --git a/wikilinks.txt b/wikilinks.txt index 05bc439..5df2e3e 100644 --- a/wikilinks.txt +++ b/wikilinks.txt @@ -64,3 +64,9 @@ get the full set of text in my tracker.

//- - - - - - - - -//

Multiple Wikilinks

//= = = = = = = = = = = = = = = = = = = = = = = =// +10 +//- - - - - - - - -// +[[😁]] +//- - - - - - - - -// +

😁

+//= = = = = = = = = = = = = = = = = = = = = = = =//