Sha256: 3cbb238767883356ff00f62fcac9a79a4f02c8222ab05dae62a68c0f1844c22b
Contents?: true
Size: 494 Bytes
Versions: 10
Compression:
Stored size: 494 Bytes
Contents
require 'temple' module Faml class Newline < Temple::Filter def on_multi(*exprs) i = exprs.size - 1 marker = false while i >= 0 case exprs[i] when [:rmnl] marker = true exprs.delete_at(i) when [:mknl] if marker marker = false exprs.delete_at(i) else exprs[i] = [:static, "\n"] end end i -= 1 end [:multi, *exprs] end end end
Version data entries
10 entries across 10 versions & 1 rubygems