Sha256: 6b41519620fa989600af5fe41eacb565ddffbb861259cd06916b38b8b9e9a400
Contents?: true
Size: 391 Bytes
Versions: 7
Compression:
Stored size: 391 Bytes
Contents
module ImproveTypography module Processors class Ellipsis < Processor REGEXP = /(\.\s*?){3,}/i def call return str unless ellipsis_sign str.gsub(REGEXP, ellipsis_sign) end private def ellipsis_sign options.fetch(:ellipsis_sign, I18n.t(:ellipsis_sign, scope: %i(improve_typography), locale: locale)) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems