Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsre: try to fix nightlies #15057

Merged
merged 1 commit into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/js/jsre.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Regular Expressions for the JavaScript target.
## * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions

when not defined(js) and not defined(Nimdoc):
{.error: "This module only works on the JavaScript platform".}

type RegExp* {.importjs.} = object ## Regular Expressions for JavaScript target.
flags* {.importjs.}: cstring ## cstring that contains the flags of the RegExp object.
dotAll* {.importjs.}: bool ## Whether `.` matches newlines or not.
Expand Down
3 changes: 2 additions & 1 deletion tools/kochdocs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ lib/posix/posix_linux_amd64_consts.nim
lib/posix/posix_other_consts.nim
lib/posix/posix_openbsd_amd64.nim
lib/posix/posix_haiku.nim
lib/js/jsre.nim
""".splitWhitespace()

when (NimMajor, NimMinor) < (1, 1) or not declared(isRelativeTo):
Expand Down Expand Up @@ -258,7 +259,7 @@ proc buildDoc(nimArgs, destPath: string) =
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc
for d in items(doc):
let extra = if isJsOnly(d): " --backend:js " else: ""
let extra = if isJsOnly(d): "--backend:js" else: ""
var nimArgs2 = nimArgs
if d.isRelativeTo("compiler"): doAssert false
commands[i] = nim & " doc $# $# --git.url:$# --outdir:$# --index:on $#" %
Expand Down