mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
16 lines
299 B
Ruby
16 lines
299 B
Ruby
module Jekyll
|
|
class RemoveEmptyLines < Liquid::Block
|
|
|
|
def initialize(tag_name, text, tokens)
|
|
super
|
|
@text = text
|
|
end
|
|
|
|
def render(context)
|
|
super.strip.gsub /^[\t\s]*$\n/, ''
|
|
end
|
|
|
|
end
|
|
end
|
|
|
|
Liquid::Template.register_tag('removeemptylines', Jekyll::RemoveEmptyLines) |