summaryrefslogtreecommitdiffstats
path: root/simpletext.go
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2021-02-05 07:53:32 +0000
committerclsr <clsr@clsr.net>2021-02-05 07:53:32 +0000
commit690a7183d7eca35b59e23e556b0c6492df08ffa5 (patch)
tree6d9267e8d92c2298a0e4be931157d311d9ba9d44 /simpletext.go
parent94a4db6923203695aeac7350eb798d3c549e1005 (diff)
downloadcnm-go-690a7183d7eca35b59e23e556b0c6492df08ffa5.tar.gz
cnm-go-690a7183d7eca35b59e23e556b0c6492df08ffa5.zip
Fix string(rune) warningv0.4.1
Diffstat (limited to 'simpletext.go')
-rw-r--r--simpletext.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/simpletext.go b/simpletext.go
index 78e089e..4d86d6d 100644
--- a/simpletext.go
+++ b/simpletext.go
@@ -159,13 +159,13 @@ func Unescape(s string) string {
return "\\"
case 'x':
n, _ := strconv.ParseUint(match[2:], 16, 8)
- return string(n)
+ return string(rune(n))
case 'u':
n, _ := strconv.ParseUint(match[2:], 16, 16)
- return string(n)
+ return string(rune(n))
case 'U':
n, _ := strconv.ParseUint(match[2:], 16, 32)
- return string(n)
+ return string(rune(n))
}
return match // this shouldn't happen
})