diff --git a/lib/cyberarm_engine/config_file.rb b/lib/cyberarm_engine/config_file.rb index ece9dbc..0d63dd1 100644 --- a/lib/cyberarm_engine/config_file.rb +++ b/lib/cyberarm_engine/config_file.rb @@ -20,7 +20,7 @@ module CyberarmEngine hash = @data[keys.shift] ||= {} keys.each do |key| - hash[key] ||= {} + hash = hash[key] ||= {} end end diff --git a/lib/cyberarm_engine/text.rb b/lib/cyberarm_engine/text.rb index 7373632..318532f 100644 --- a/lib/cyberarm_engine/text.rb +++ b/lib/cyberarm_engine/text.rb @@ -103,6 +103,10 @@ module CyberarmEngine textobject.text_width(text) end + def markup_width(text = @text) + textobject.markup_width(text) + end + def height(text = @text) text.lines.count > 0 ? (text.lines.count) * textobject.height : @textobject.height end