mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 03:02:31 +00:00
Corrected code example in pegs
The code as `"var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2")` just results in `$1<-$2$2; $1<-$2$2`
This commit is contained in:
@@ -902,7 +902,7 @@ proc replacef*(s: string, sub: Peg, by: string): string {.
|
||||
## with the notation ``$i`` and ``$#`` (see strutils.`%`). Examples:
|
||||
##
|
||||
## .. code-block:: nim
|
||||
## "var1=key; var2=key2".replace(peg"{\ident}'='{\ident}", "$1<-$2$2")
|
||||
## "var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2")
|
||||
##
|
||||
## Results in:
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user