aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux/data/format/css.lux2
-rw-r--r--stdlib/source/lux/data/text/format.lux2
-rw-r--r--stdlib/test/test/lux/data/text/format.lux4
3 files changed, 5 insertions, 3 deletions
diff --git a/stdlib/source/lux/data/format/css.lux b/stdlib/source/lux/data/format/css.lux
index 1de9e0192..0c4551e0a 100644
--- a/stdlib/source/lux/data/format/css.lux
+++ b/stdlib/source/lux/data/format/css.lux
@@ -75,7 +75,7 @@
(do-template [<name> <suffix>]
[(def: #export (<name> value)
(-> Frac Value)
- (format (%r value) <suffix>))]
+ (format (%f value) <suffix>))]
[em "em"]
[ex "ex"]
diff --git a/stdlib/source/lux/data/text/format.lux b/stdlib/source/lux/data/text/format.lux
index c434d4637..f0b9d0e6f 100644
--- a/stdlib/source/lux/data/text/format.lux
+++ b/stdlib/source/lux/data/text/format.lux
@@ -41,7 +41,7 @@
[%n Nat (:: number;Codec<Text,Nat> encode)]
[%i Int (:: number;Codec<Text,Int> encode)]
[%d Deg (:: number;Codec<Text,Deg> encode)]
- [%r Frac (:: number;Codec<Text,Frac> encode)]
+ [%f Frac (:: number;Codec<Text,Frac> encode)]
[%t Text text;encode]
[%ident Ident (:: ident;Codec<Text,Ident> encode)]
[%code Code code;to-text]
diff --git a/stdlib/test/test/lux/data/text/format.lux b/stdlib/test/test/lux/data/text/format.lux
index 9ffa120bb..d1f7fc9f0 100644
--- a/stdlib/test/test/lux/data/text/format.lux
+++ b/stdlib/test/test/lux/data/text/format.lux
@@ -12,8 +12,10 @@
($_ seq
(test "Can format common values simply."
(and (&/= "true" (%b true))
+ (&/= "+123" (%n +123))
(&/= "123" (%i 123))
- (&/= "123.456" (%r 123.456))
+ (&/= "123.456" (%f 123.456))
+ (&/= ".5" (%d .5))
(&/= "\"YOLO\"" (%t "YOLO"))
(&/= "User-id: 123 -- Active: true" (format "User-id: " (%i 123) " -- Active: " (%b true)))))
)))