Sha256: bf66771961c3db08f620c19efcc72ce2f117d2a1b164860215edc1ae82ebeeed
Contents?: true
Size: 456 Bytes
Versions: 9
Compression:
Stored size: 456 Bytes
Contents
module Wovnrb class ReplacerBase def replace(dom, lang) raise NotImplementedError.new('replace is not defined') end protected def wovn_ignore?(node) if !node.get_attribute('wovn-ignore').nil? return true elsif node.name === 'html' return false end wovn_ignore?(node.parent) end def replace_text(from, to) from.gsub(/\A(\s*)[\S\s]*?(\s*)\Z/, '\1' + to + '\2') end end end
Version data entries
9 entries across 9 versions & 1 rubygems