diff options
author | Miran <narimiran@disroot.org> | 2020-09-29 23:43:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 23:43:12 +0200 |
commit | eb2a4961c71029c874ebdacd1b23a349eb8e61d5 (patch) | |
tree | d45c7cbd8e5125447c673f9407933aa6bacd7d46 /lib | |
parent | 4058801607b37fa707eb1b41d129ce74557eccac (diff) | |
download | Nim-eb2a4961c71029c874ebdacd1b23a349eb8e61d5.tar.gz |
various documentation fixes [backport] (#15422)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/impure/nre.nim | 8 | ||||
-rw-r--r-- | lib/pure/strutils.nim | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/impure/nre.nim b/lib/impure/nre.nim index 12ea7ab56..4696f7322 100644 --- a/lib/impure/nre.nim +++ b/lib/impure/nre.nim @@ -539,7 +539,7 @@ proc matchImpl(str: string, pattern: Regex, start, endpos: int, flags: int): Opt raise RegexInternalError(msg: "Unknown internal error: " & $execRet) proc match*(str: string, pattern: Regex, start = 0, endpos = int.high): Option[RegexMatch] = - ## Like ` ``find(...)`` <#proc-find>`_, but anchored to the start of the + ## Like `find(...)<#find,string,Regex,int>`_, but anchored to the start of the ## string. ## runnableExamples: @@ -549,11 +549,11 @@ proc match*(str: string, pattern: Regex, start = 0, endpos = int.high): Option[R return str.matchImpl(pattern, start, endpos, pcre.ANCHORED) iterator findIter*(str: string, pattern: Regex, start = 0, endpos = int.high): RegexMatch = - ## Works the same as ` ``find(...)`` <#proc-find>`_, but finds every + ## Works the same as `find(...)<#find,string,Regex,int>`_, but finds every ## non-overlapping match. ``"2222".find(re"22")`` is ``"22", "22"``, not ## ``"22", "22", "22"``. ## - ## Arguments are the same as ` ``find(...)`` <#proc-find>`_ + ## Arguments are the same as `find(...)<#find,string,Regex,int>`_ ## ## Variants: ## @@ -632,7 +632,7 @@ proc split*(str: string, pattern: Regex, maxSplit = -1, start = 0): seq[string] ## Splits the string with the given regex. This works according to the ## rules that Perl and Javascript use. ## - ## ``start`` behaves the same as in ` ``find(...)`` <#proc-find>`_. + ## ``start`` behaves the same as in `find(...)<#find,string,Regex,int>`_. ## runnableExamples: # - If the match is zero-width, then the string is still split: diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index d97ed9a07..20ad2f517 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -1930,7 +1930,7 @@ proc initSkipTable*(a: var SkipTable, sub: string) proc find*(a: SkipTable, s, sub: string, start: Natural = 0, last = 0): int {.noSideEffect, rtl, extern: "nsuFindStrA".} = - ## Searches for `sub` in `s` inside range `start`..`last` using preprocessed + ## Searches for `sub` in `s` inside range `start..last` using preprocessed ## table `a`. If `last` is unspecified, it defaults to `s.high` (the last ## element). ## |