From 90d4c4be3bc15b2f594a0046c07b6f8654659ad5 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Fri, 20 Dec 2019 07:35:07 +0300 Subject: Add Nim 1.0 support --- src/format.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/format.nim') diff --git a/src/format.nim b/src/format.nim index f20eaf7..2ac39dc 100644 --- a/src/format.nim +++ b/src/format.nim @@ -1,5 +1,5 @@ import - future, macros, options, posix, sequtils, strutils, times, unicode, + macros, options, posix, sequtils, strutils, sugar, times, unicode, utils type @@ -94,8 +94,8 @@ proc splitLines(text: string, lineSize: int, lines: seq[string] = @[]): seq[stri if index < 0: lines & text else: - text[index .. ^1].strip.splitLines(lineSize, - lines & text[0 .. index - 1].strip) + strutils.strip(text[index .. ^1]).splitLines(lineSize, + lines & strutils.strip(text[0 .. index - 1])) proc printPackageInfo*(minPadding: int, color: bool, lines: varargs[PackageLineFormat]) = let width = getWindowSize().width @@ -108,9 +108,9 @@ proc printPackageInfo*(minPadding: int, color: bool, lines: varargs[PackageLineF if values.len == 0: @[] elif forceBreak: - lc[x | (y <- values.map(s => s.strip.splitLines(lineSize)), x <- y), string] + lc[x | (y <- values.map(s => strutils.strip(s).splitLines(lineSize)), x <- y), string] else: - values.map(v => v.strip).foldl(a & " " & b).splitLines(lineSize) + values.map(v => strutils.strip(v)).foldl(a & " " & b).splitLines(lineSize) proc formatText(values: seq[string], forceBreak: bool): string = let textSeq = formatTextLines(values, forceBreak) -- cgit v1.2.3-70-g09d2