From 82a1576263c3c64f7a171710c747acc5fa62a52c Mon Sep 17 00:00:00 2001 From: Vindaar Date: Thu, 18 Oct 2018 14:47:47 +0200 Subject: fix #9394 by replacing `fmt` with `strutils.%` (#9417) * fix #9394 by replacing `fmt` with normal string append Until issue #7632 is fixed, use string append. * use `strutils.%` instead of normal string add --- lib/pure/terminal.nim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/pure') diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim index 2e138b27e..974dc839d 100644 --- a/lib/pure/terminal.nim +++ b/lib/pure/terminal.nim @@ -18,7 +18,7 @@ import macros import strformat -from strutils import toLowerAscii +from strutils import toLowerAscii, `%` import colors, tables when defined(windows): @@ -635,7 +635,8 @@ proc ansiForegroundColorCode*(color: Color): string = template ansiForegroundColorCode*(color: static[Color]): string = const rgb = extractRGB(color) - (static(fmt"{fgPrefix}{rgb.r};{rgb.g};{rgb.b}m")) + # no usage of `fmt`, see issue #7632 + (static("$1$2;$3;$4m" % [$fgPrefix, $(rgb.r), $(rgb.g), $(rgb.b)])) proc ansiBackgroundColorCode*(color: Color): string = let rgb = extractRGB(color) @@ -643,7 +644,8 @@ proc ansiBackgroundColorCode*(color: Color): string = template ansiBackgroundColorCode*(color: static[Color]): string = const rgb = extractRGB(color) - (static(fmt"{bgPrefix}{rgb.r};{rgb.g};{rgb.b}m")) + # no usage of `fmt`, see issue #7632 + (static("$1$2;$3;$4m" % [$bgPrefix, $(rgb.r), $(rgb.g), $(rgb.b)])) proc setForegroundColor*(f: File, color: Color) = ## Sets the terminal's foreground true color. -- cgit 1.4.1-2-gfad0 ?h=devel&id=496bd790e1b641a7c025bde2c6a1c6dca433ed5d'>diff stats
path: root/compiler/dfa.nim
blob: ea60dbc591e724bd20c9247d78e5e5a65ee7ebde (plain) (tree)
1
2
3
4
5
6
7
8
9