1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 01:44:25 +04:00
Files
tabler/_plugins/jekyll-removeemptylines.rb
2018-02-19 20:17:04 +01:00

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)