Method: IsoDoc::GemTasks.comment_out_liquid
- Defined in:
- lib/isodoc/gem_tasks.rb
.comment_out_liquid(text) ⇒ Object
83 84 85 86 87 88 89 90 91 |
# File 'lib/isodoc/gem_tasks.rb', line 83 def comment_out_liquid(text) text.split("\n").map do |line| if line.match?(/(?<!{){({|%)(?![{%]).+(}|%)}/) "/* LIQUID_COMMENT#{line}LIQUID_COMMENT */" else line end end.join("\n") end |