Purify Categories
Apply the same methodology, as in Revision 432, to the category chunk-handler. This completes the replacement of all the code that looks like if string.is_utf8? do something else complain end with code that looks like string.purify do something
This commit is contained in:
parent
c79fef9c01
commit
116255dc0d
3 changed files with 14 additions and 2 deletions
|
@ -18,7 +18,8 @@ class Category < Chunk::Abstract
|
|||
def initialize(match_data, content)
|
||||
super(match_data, content)
|
||||
@hidden = match_data[1]
|
||||
@list = match_data[2].split(',').map { |c| c.to_s.is_utf8? ? c.strip.escapeHTML : nil }
|
||||
# @list = match_data[2].split(',').map { |c| clean = c.purify; clean.strip.escapeHTML if clean }
|
||||
@list = match_data[2].split(',').map { |c| clean = c.purify.strip.escapeHTML; clean if clean != ''}
|
||||
@list.compact!
|
||||
@unmask_text = ''
|
||||
if @hidden
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue