Sha256: dbdbaac6913498e9f89ebfb090812c5ff960c31590365f9dad8e281eb6bc3288
Contents?: true
Size: 281 Bytes
Versions: 2
Compression:
Stored size: 281 Bytes
Contents
# frozen_string_literal: true module Permalink module Normalizations module NonAlphanumeric def self.call(input, options = DEFAULT_OPTIONS) regex = /[^#{options[:separator]}a-z0-9]/sim input.gsub(regex, options[:separator]) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
permalink-3.0.0 | lib/permalink/normalizations/non_alphanumeric.rb |
permalink-2.1.0 | lib/permalink/normalizations/non_alphanumeric.rb |