From 03a43f2d87ef33e0a795474b6da5df9fa9d29c2c Mon Sep 17 00:00:00 2001 From: totoro Date: Tue, 23 Oct 2018 00:13:32 +0200 Subject: [PATCH] add empty alternative into CoreAttrs --- web/CXM_making_a_web_site.anubis | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index f3a4970..3927684 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -1085,6 +1085,7 @@ public type HtmlEvents: ontoggle. //HTML5 Fires when the user opens or closes the
element public type CoreAttrs: + empty, id (String), class (String), style (String), @@ -4816,10 +4817,11 @@ define String new_styles = if h is style(style_string) then [style_string . styles] else styles, current = if h is { + empty then "", id(id_name) then " id=\"" + id_name + "\"", - class(class_name) then "", - style(style_string) then "", + class(class_name) then "", //do nothing here, because we accumulate the class until we have some other attributes + style(style_string) then "", //do nothing here, because we accumulate the style until we have some other attributes title(title_string) then " title=\"" + title_string + "\"", -- libgit2 0.21.4