about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-09-07 19:05:03 +0200
committerbptato <nincsnevem662@gmail.com>2024-09-07 19:08:45 +0200
commite88886243f2282e913d44006916397e076a76425 (patch)
tree374c5b75287550bd149c36121ec3cc464ed1f709 /src
parent5af213daa57549f190ae1c511ddcc8d37464139a (diff)
downloadchawan-e88886243f2282e913d44006916397e076a76425.tar.gz
md2html: code, pre, inline fixes
Diffstat (limited to 'src')
-rw-r--r--src/utils/strwidth.nim2
-rw-r--r--src/utils/twtstr.nim4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/strwidth.nim b/src/utils/strwidth.nim
index fe9df92d..90784890 100644
--- a/src/utils/strwidth.nim
+++ b/src/utils/strwidth.nim
@@ -52,7 +52,7 @@ func width*(s: string; start, len: int): int =
     fastRuneAt(s, i, r)
     result += r.twidth(result)
 
-func notwidth*(s: string): int =
+func notwidth*(s: openArray[char]): int =
   result = 0
   for r in s.runes:
     result += r.width()
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 3b10cf8c..0d65be50 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -124,7 +124,7 @@ func endsWithIgnoreCase*(s1, s2: string): bool =
       return false
   return true
 
-func skipBlanks*(buf: string; at: int): int =
+func skipBlanks*(buf: openArray[char]; at: int): int =
   result = at
   while result < buf.len and buf[result] in AsciiWhitespace:
     inc result
@@ -386,7 +386,7 @@ func percentDecode*(input: string; si = 0): string =
         i += 2
     inc i
 
-func htmlEscape*(s: string): string =
+func htmlEscape*(s: openArray[char]): string =
   result = ""
   for c in s:
     case c