diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-12-06 16:54:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-06 09:54:32 +0100 |
commit | 1e320bc8c5112b152ebc3092331b8b1fe0ae5191 (patch) | |
tree | 9bc4b4d4732101cc03df813b96626718a5016cb4 /lib/pure/unidecode/unidecode.nim | |
parent | 48d7c40553f0769c22b4b47f8079dd96c3e23323 (diff) | |
download | Nim-1e320bc8c5112b152ebc3092331b8b1fe0ae5191.tar.gz |
[docs minor]space for code-block (#16266)
* [docs minor]space for code-block * correct more errors * to runnableExamples * add newline
Diffstat (limited to 'lib/pure/unidecode/unidecode.nim')
-rw-r--r-- | lib/pure/unidecode/unidecode.nim | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/pure/unidecode/unidecode.nim b/lib/pure/unidecode/unidecode.nim index 9a10ccc00..166608aeb 100644 --- a/lib/pure/unidecode/unidecode.nim +++ b/lib/pure/unidecode/unidecode.nim @@ -52,15 +52,9 @@ proc loadUnidecodeTable*(datafile = "unidecode.dat") = proc unidecode*(s: string): string = ## Finds the sequence of ASCII characters that is the closest approximation ## to the UTF-8 string `s`. - ## - ## Example: - ## - ## ..code-block:: nim - ## - ## unidecode("北京") - ## - ## Results in: "Bei Jing" - ## + runnableExamples: + assert unidecode("北京") == "Bei Jing " + result = "" for r in runes(s): var c = int(r) |