allow inheritable to be sent through as a tag
This commit is contained in:
parent
04b0849dc5
commit
77d7587150
@ -9,7 +9,7 @@ module Locomotive
|
|||||||
def initialize(tag_name, markup, tokens, context)
|
def initialize(tag_name, markup, tokens, context)
|
||||||
if markup =~ Syntax
|
if markup =~ Syntax
|
||||||
@slug = $1.gsub('\'', '')
|
@slug = $1.gsub('\'', '')
|
||||||
@options = {}
|
@options = { :inheritable => true }
|
||||||
markup.scan(::Liquid::TagAttributes) { |key, value| @options[key.to_sym] = value.gsub(/^'/, '').gsub(/'$/, '') }
|
markup.scan(::Liquid::TagAttributes) { |key, value| @options[key.to_sym] = value.gsub(/^'/, '').gsub(/'$/, '') }
|
||||||
else
|
else
|
||||||
raise ::Liquid::SyntaxError.new("Syntax Error in 'editable_xxx' - Valid syntax: editable_xxx <slug>(, <options>)")
|
raise ::Liquid::SyntaxError.new("Syntax Error in 'editable_xxx' - Valid syntax: editable_xxx <slug>(, <options>)")
|
||||||
@ -27,6 +27,7 @@ module Locomotive
|
|||||||
:slug => @slug,
|
:slug => @slug,
|
||||||
:hint => @options[:hint],
|
:hint => @options[:hint],
|
||||||
:default_content => @nodelist.first.to_s,
|
:default_content => @nodelist.first.to_s,
|
||||||
|
:inheritable => @options[:inheritable],
|
||||||
:disabled => false,
|
:disabled => false,
|
||||||
:from_parent => false
|
:from_parent => false
|
||||||
}, document_type)
|
}, document_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user