From f391f448f4fe6508502a68aa1c51d60475967952 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 26 Jan 2023 02:39:27 -0400 Subject: Optimized Tar parsing in order to fix stack-overflow when loading cache. --- stdlib/source/format/lux/data/text.lux | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'stdlib/source/format') diff --git a/stdlib/source/format/lux/data/text.lux b/stdlib/source/format/lux/data/text.lux index d998310ae..e4adae6f7 100644 --- a/stdlib/source/format/lux/data/text.lux +++ b/stdlib/source/format/lux/data/text.lux @@ -87,6 +87,26 @@ [json json.JSON (of json.codec encoded)] ) +(with_template [ ] + [(def .public + (Format Frac) + (|>> ((template.symbol [frac._] [])) + frac.int + ..int + (text.suffix )))] + + ["%" percentage] + + ... https://en.wikipedia.org/wiki/Degree_symbol + ["°" degree] + + ... https://en.wikipedia.org/wiki/Per_mille + ["‰" permille] + + ... https://en.wikipedia.org/wiki/Basis_point + ["‱" permyriad] + ) + (with_template [ ,] [(`` (with_template [ ] [(def .public -- cgit v1.2.3