Set tag name as ivar
This lets us use just one syntax_example method for both classes.
This commit is contained in:
parent
5fe73a6671
commit
deb4e0d24a
|
@ -26,10 +26,11 @@ module Jekyll
|
||||||
@file, @params = markup.strip.split(' ', 2);
|
@file, @params = markup.strip.split(' ', 2);
|
||||||
end
|
end
|
||||||
validate_params if @params
|
validate_params if @params
|
||||||
|
@tag_name = tag_name
|
||||||
end
|
end
|
||||||
|
|
||||||
def syntax_example
|
def syntax_example
|
||||||
"{% include file.ext param='value' param2='value' %}"
|
"{% #{@tag_name} file.ext param='value' param2='value' %}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_params(context)
|
def parse_params(context)
|
||||||
|
@ -156,10 +157,6 @@ eos
|
||||||
page_path = context.registers[:page].nil? ? includes_dir : File.dirname(context.registers[:page]["path"])
|
page_path = context.registers[:page].nil? ? includes_dir : File.dirname(context.registers[:page]["path"])
|
||||||
Jekyll.sanitized_path(context.registers[:site].source, page_path)
|
Jekyll.sanitized_path(context.registers[:site].source, page_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def syntax_example
|
|
||||||
"{% include_relative file.ext param='value' param2='value' %}"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue