about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/bindings/quickjs.nim2
-rw-r--r--src/html/dom.nim8
-rw-r--r--src/io/serialize.nim2
-rw-r--r--src/js/javascript.nim8
-rw-r--r--src/local/pager.nim4
-rw-r--r--src/server/buffer.nim4
-rw-r--r--src/types/cookie.nim2
-rw-r--r--src/types/url.nim2
8 files changed, 17 insertions, 15 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim
index a2cf431e..53384b77 100644
--- a/src/bindings/quickjs.nim
+++ b/src/bindings/quickjs.nim
@@ -27,7 +27,7 @@ const                         ##  all tags with a reference count are negative
   JS_TAG_FLOAT64* = 7           ##  any larger tag is FLOAT64 if JS_NAN_BOXING
 
 when sizeof(int) < sizeof(int64):
-  {.passC: "-DJS_NAN_BOXING".}
+  {.passc: "-DJS_NAN_BOXING".}
   type
     JSValue* {.importc, header: qjsheader.} = distinct uint64
 
diff --git a/src/html/dom.nim b/src/html/dom.nim
index e411c069..89716be5 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -1593,8 +1593,10 @@ func canSubmitImplicitly*(form: HTMLFormElement): bool =
   return true
 
 func qualifiedName*(element: Element): string =
-  if element.namespacePrefix.issome: element.namespacePrefix.get & ':' & element.localName
-  else: element.localName
+  if element.namespacePrefix.isSome:
+    element.namespacePrefix.get & ':' & element.localName
+  else:
+    element.localName
 
 func html*(document: Document): HTMLElement =
   for element in document.elements(TAG_HTML):
@@ -1888,7 +1890,7 @@ func inputString*(input: HTMLInputElement): string =
     if input.value != "": input.value
     else: "SUBMIT"
   of INPUT_FILE:
-    if input.file.isnone:
+    if input.file.isNone:
       "".padToWidth(int(input.attrulgz("size").get(20)))
     else:
       input.file.get.path.serialize_unicode().padToWidth(int(input.attrulgz("size").get(20)))
diff --git a/src/io/serialize.nim b/src/io/serialize.nim
index 4a1a810b..244dc201 100644
--- a/src/io/serialize.nim
+++ b/src/io/serialize.nim
@@ -329,7 +329,7 @@ func slen*(blob: Blob): int =
     result += int(blob.size) #TODO ??
 
 proc swrite*[T](stream: Stream, o: Option[T]) =
-  stream.swrite(o.issome)
+  stream.swrite(o.isSome)
   if o.isSome:
     stream.swrite(o.get)
 
diff --git a/src/js/javascript.nim b/src/js/javascript.nim
index ac438e1b..3575bdf7 100644
--- a/src/js/javascript.nim
+++ b/src/js/javascript.nim
@@ -281,7 +281,7 @@ type FuncParam = tuple[name: string, t: NimNode, val: Option[NimNode], generic:
 func getMinArgs(params: seq[FuncParam]): int =
   for i in 0..<params.len:
     let it = params[i]
-    if it[2].issome:
+    if it[2].isSome:
       return i
     let t = it.t
     if t.kind == nnkBracketExpr:
@@ -597,7 +597,7 @@ proc addUnionParam0(gen: var JSFuncGenerator, tt: NimNode, s: NimNode, val: NimN
       fallback)
   # 10. If Type(V) is Object, then:
   # Sequence:
-  if seqg.issome:
+  if seqg.isSome:
     let query = quote do:
       isSequence(ctx, `val`)
     let a = seqg.get[1]
@@ -605,7 +605,7 @@ proc addUnionParam0(gen: var JSFuncGenerator, tt: NimNode, s: NimNode, val: NimN
       let `s` = fromJS_or_die(seq[`a`], ctx, `val`, `ev`, `dl`),
       fallback)
   # Record:
-  if tableg.issome:
+  if tableg.isSome:
     let a = tableg.get[1]
     let b = tableg.get[2]
     let query = quote do:
@@ -1032,7 +1032,7 @@ macro jsfgetn(jsname: static string, uf: static bool, fun: typed) =
   var gen = setupGenerator(fun, GETTER, jsname = jsname, unforgeable = uf)
   if gen.actualMinArgs != 0 or gen.funcParams.len != gen.minArgs:
     error("jsfget functions must only accept one parameter.")
-  if gen.returnType.isnone:
+  if gen.returnType.isNone:
     error("jsfget functions must have a return type.")
   if gen.newName.strVal in existing_funcs:
     #TODO TODO TODO ditto
diff --git a/src/local/pager.nim b/src/local/pager.nim
index bdb7ec72..b1146fcf 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -696,7 +696,7 @@ proc gotoURL(pager: Pager, request: Request, prevurl = none(URL),
   if referrer != nil and referrer.config.referer_from:
     request.referer = referrer.source.location
   var bufferconfig = pager.applySiteconf(request.url)
-  if prevurl.isnone or not prevurl.get.equals(request.url, true) or
+  if prevurl.isNone or not prevurl.get.equals(request.url, true) or
       request.url.hash == "" or request.httpMethod != HTTP_GET:
     # Basically, we want to reload the page *only* when
     # a) we force a reload (by setting prevurl to none)
@@ -747,7 +747,7 @@ proc loadURL*(pager: Pager, url: string, ctype = none(string),
   let url0 = pager.omniRewrite(url)
   let url = if url[0] == '~': expandPath(url0) else: url0
   let firstparse = parseURL(url)
-  if firstparse.issome:
+  if firstparse.isSome:
     let prev = if pager.container != nil:
       some(pager.container.source.location)
     else:
diff --git a/src/server/buffer.nim b/src/server/buffer.nim
index 063dfb7a..43944982 100644
--- a/src/server/buffer.nim
+++ b/src/server/buffer.nim
@@ -1389,7 +1389,7 @@ proc readSuccess*(buffer: Buffer, s: string): ReadSuccessResult {.proxy.} =
       of INPUT_FILE:
         let cdir = parseURL("file://" & getCurrentDir() & DirSep)
         let path = parseURL(s, cdir)
-        if path.issome:
+        if path.isSome:
           input.file = path
           input.invalid = true
           buffer.do_reshape()
@@ -1543,7 +1543,7 @@ proc click(buffer: Buffer, input: HTMLInputElement): ClickResult =
     ))
   of INPUT_FILE:
     result.repaint = buffer.setFocus(input)
-    var path = if input.file.issome:
+    var path = if input.file.isSome:
       input.file.get.path.serialize_unicode()
     else:
       ""
diff --git a/src/types/cookie.nim b/src/types/cookie.nim
index 93daf2a3..f55a150e 100644
--- a/src/types/cookie.nim
+++ b/src/types/cookie.nim
@@ -233,7 +233,7 @@ proc newCookie*(str: string, url: URL = nil): JSResult[Cookie]
     case key.toLowerAscii()
     of "expires":
       let date = parseCookieDate(val)
-      if date.issome:
+      if date.isSome:
         cookie.expires = date.get.toTime().toUnix()
     of "max-age":
       let x = parseInt64(val)
diff --git a/src/types/url.nim b/src/types/url.nim
index 75bc162e..f2957807 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -370,7 +370,7 @@ func unicodeToAscii(s: string, checkhyphens, checkbidi, checkjoiners,
     transitionalprocessing, verifydnslength: bool): Option[string] =
   let processed = s.processIdna(checkhyphens, checkbidi, checkjoiners,
     transitionalprocessing)
-  if processed.isnone:
+  if processed.isNone:
     return none(string) #error
   var labels: seq[string]
   var all = 0