[docs minor]space for code-block (#16266)
* [docs minor]space for code-block * correct more errors * to runnableExamples * add newline
This commit is contained in:
parent
48d7c40553
commit
1e320bc8c5
4 changed files with 9 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue