lib/csl/style/text.rb in csl-1.0.2 vs lib/csl/style/text.rb in csl-1.1.0

- old
+ new

@@ -12,23 +12,25 @@ end def variable attributes[:variable] end - + def variable_options attributes_for :form end def has_macro? attribute?(:macro) end # @return [Macro, nil] def macro - raise unless parent.respond_to?(:macros) - parent.macros[attributes[:macro]] + raise "failed to resolve macro #{attributes[:macro].inspect}" unless + !root? && root.respond_to?(:macros) + + root.macros[attributes[:macro]] end def has_term? attribute?(:term) end @@ -41,6 +43,6 @@ attributes[:value] end end end -end \ No newline at end of file +end