Sha256: 55b89a092095d8af4b473318af76ba1ca6117b2f43762ca9986e237c1698fcda
Contents?: true
Size: 544 Bytes
Versions: 17
Compression:
Stored size: 544 Bytes
Contents
# frozen_string_literal: true require 'haml/escape' module Haml # This module allows Temple::Filter to dispatch :fescape on `#compile`. module EscapeanyDispathcer def on_escapeany(flag, exp) [:escapeany, flag, compile(exp)] end end ::Temple::Filter.include EscapeanyDispathcer # Unlike Haml::Escape, this calls to_s when not escaped. class EscapeAny < Escape alias_method :on_escapeany, :on_escape def on_dynamic(value) [:dynamic, @escape ? @escape_code % value : "(#{value}).to_s"] end end end
Version data entries
17 entries across 17 versions & 1 rubygems