diff --git a/doc/lib.txt b/doc/lib.txt
index 2da753007..5bacfcc4f 100644
--- a/doc/lib.txt
+++ b/doc/lib.txt
@@ -594,7 +594,8 @@ compiler.
.. raw:: html
-
+ If you are reading this you are missing
+ babelpkglist.js or have javascript disabled in your browser.
Unofficial packages
-------------------
@@ -605,7 +606,8 @@ Nimrod programming language.
.. raw:: html
-
+ If you are reading this you are missing
+ babelpkglist.js or have javascript disabled in your browser.
diff --git a/web/babelpkglist.nim b/web/babelpkglist.nim
index 8745c9f99..5da7d60a9 100644
--- a/web/babelpkglist.nim
+++ b/web/babelpkglist.nim
@@ -21,7 +21,7 @@ proc processContent(content: string) =
var jsonArr = jsonDoc.elems
jsonArr.sort do (x, y: PJsonNode) -> int:
- system.cmp(x["name"].str, y["name"].str)
+ strutils.cmpIgnoreCase(x["name"].str, y["name"].str)
var
officialList = ""
@@ -38,8 +38,7 @@ proc processContent(content: string) =
else: pkg["url"].str
let
desc = pkg["description"].str
- # Review array index access when #1291 is solved.
- dot = if desc.high > 0 and desc[ 0 and desc[desc.high] in endings: "" else: "."
listItem = li(a(href=pkgWeb, pkg["name"].str), " ", desc & dot)
if pkg["url"].str.startsWith("git://github.com/nimrod-code") or
"official" in pkg["tags"].elems:
@@ -51,19 +50,17 @@ proc processContent(content: string) =
var officialPkgListDiv = document.getElementById("officialPkgList")
- officialPkgListDiv.innerHTML.add(
+ officialPkgListDiv.innerHTML =
p("There are currently " & $officialCount &
" official packages in the Babel package repository.") &
ul(officialList)
- )
var unofficialPkgListDiv = document.getElementById("unofficialPkgList")
- unofficialPkgListDiv.innerHTML.add(
+ unofficialPkgListDiv.innerHTML =
p("There are currently " & $unofficialCount &
" unofficial packages in the Babel package repository.") &
ul(unofficialList)
- )
proc gotPackageList(apiReply: TData) {.exportc.} =
let decoded = decodeContent($apiReply.content)