lib/curly/component_scanner.rb in curly-templates-2.3.2 vs lib/curly/component_scanner.rb in curly-templates-2.4.0

- old
+ new

@@ -2,18 +2,21 @@ module Curly class ComponentScanner def self.scan(component) first, rest = component.strip.split(/\s+/, 2) - name, identifier = first.split(".", 2) + contexts = first.split(":") + name_and_identifier = contexts.pop + name, identifier = name_and_identifier.split(".", 2) + if identifier && identifier.end_with?("?") name += "?" identifier = identifier[0..-2] end attributes = AttributeScanner.scan(rest) - [name, identifier, attributes] + [name, identifier, attributes, contexts] end end end