Cleanup
This commit is contained in:
parent
db74fa8893
commit
63b9e8dbc1
1 changed files with 4 additions and 4 deletions
|
@ -4,21 +4,21 @@ import strutils, uri, os, re, algorithm
|
||||||
import jester
|
import jester
|
||||||
|
|
||||||
import router_utils
|
import router_utils
|
||||||
import ".."/[types]
|
import ../types
|
||||||
import ../views/[general, preferences]
|
import ../views/[general, preferences]
|
||||||
|
|
||||||
export preferences
|
export preferences
|
||||||
|
|
||||||
let reTitleize = re"(?<![A-z])[a-z]"
|
let titleizeRegex = re"(?<![A-z])[a-z]"
|
||||||
|
|
||||||
proc titleize(str: string): string =
|
proc titleize(str: string): string =
|
||||||
result = str
|
result = str
|
||||||
var idx = 0
|
var idx = 0
|
||||||
while idx != -1:
|
while idx != -1:
|
||||||
idx = str.find(reTitleize, start = idx)
|
idx = str.find(titleizeRegex, start = idx)
|
||||||
if idx != -1:
|
if idx != -1:
|
||||||
result[idx] = str[idx].toUpperAscii
|
result[idx] = str[idx].toUpperAscii
|
||||||
idx.inc
|
inc idx
|
||||||
|
|
||||||
proc findThemes*(dir: string): seq[string] =
|
proc findThemes*(dir: string): seq[string] =
|
||||||
for kind, path in walkDir(dir / "css" / "themes"):
|
for kind, path in walkDir(dir / "css" / "themes"):
|
||||||
|
|
Loading…
Reference in a new issue