mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-25 14:28:15 +00:00
std/nre2 is implemented using https://github.com/nitely/nim-regex. std/nre2 has almost same features as std/nre but some regular expressions supported by std/nre are not supported. The syntax of regular expressions of Nim Regex is explained in: https://nitely.github.io/nim-regex/regex.html
15 lines
439 B
Nim
15 lines
439 B
Nim
import std/os
|
|
|
|
if getCommand() == "doc":
|
|
# std/nre2 requires nim-regex and it requires nim-unicodedb.
|
|
# when build documentation on CI, git clone them as nimble is not available
|
|
|
|
const PkgDir = "build/deps"
|
|
const Pkgs = ["nim-regex", "nim-unicodedb"]
|
|
|
|
for n in Pkgs:
|
|
if not dirExists(PkgDir / n):
|
|
exec("git clone -q https://github.com/nitely/" & n & " " & (PkgDir / n))
|
|
|
|
switch("path", "$nim" / PkgDir / n / "src")
|