aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-01 12:51:19 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-01 12:51:19 -0400
commit639d5ddfca562e5b3645955551be244b5e8ca9c6 (patch)
tree2a2fba7b2d442b5cf7e9dd2e1f876e4f799a6bdf /examples
parent0a7062e2d711b5ac7fb71e873f293a8f0d0e8bc6 (diff)
Make text indexing optional
Diffstat (limited to 'examples')
-rw-r--r--examples/colorful/colorful.tm2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/colorful/colorful.tm b/examples/colorful/colorful.tm
index fed873fd..bef77dd3 100644
--- a/examples/colorful/colorful.tm
+++ b/examples/colorful/colorful.tm
@@ -53,7 +53,7 @@ enum _Color(Default, Bright(color:Int16), Color8Bit(color:Int16), Color24Bit(col
hex := text.from(2)
return none unless hex.length == 3 or hex.length == 6
if hex.length == 3
- hex = hex[1]++hex[1]++hex[2]++hex[2]++hex[3]++hex[3]
+ hex = hex[1]!++hex[1]!++hex[2]!++hex[2]!++hex[3]!++hex[3]!
n := Int32.parse("0x" ++ hex) or return none
return Color24Bit(n)
else if text.matches_pattern($Pat/{1-3 digit}/)