From 7392c8a74e516d4dba9021d77a4976162404afc9 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Tue, 6 Aug 2024 11:33:06 -0300 Subject: [PATCH] Basic theme parser --- src/styles.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/styles.cr b/src/styles.cr index eceaae2..4d6ab36 100644 --- a/src/styles.cr +++ b/src/styles.cr @@ -51,9 +51,9 @@ module Tartrazine s.underline = true if style.includes?("underline") s.underline = false if style.includes?("nounderline") - s.color = style.find { |w| w.starts_with?("#") }.try &.split("#").last - s.background = style.find { |w| w.starts_with?("bg:#") }.try &.split("#").last - s.border = style.find { |w| w.starts_with?("border:#") }.try &.split("#").last + s.color = style.find(&.starts_with?("#")).try &.split("#").last + s.background = style.find(&.starts_with?("bg:#")).try &.split("#").last + s.border = style.find(&.starts_with?("border:#")).try &.split("#").last theme.styles[node["type"]] = s end