Skip to content

Commit

Permalink
Replaces \w with [[:alnum:]] to avoid acentuated tags to be split on …
Browse files Browse the repository at this point in the history
…the accentuated character
  • Loading branch information
Frédéric de Villamil committed Dec 26, 2012
1 parent 8363c8a commit 6cb09f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/article.rb
Expand Up @@ -246,7 +246,7 @@ def keywords_to_tags
Article.transaction do Article.transaction do
tags.clear tags.clear
tags << tags <<
keywords.to_s.scan(/((['"]).*?\2|[\.\w]+)/).collect do |x| keywords.to_s.scan(/((['"]).*?\2|[\.[[:alnum:]]]+)/).collect do |x|
x.first.tr("\"'", '') x.first.tr("\"'", '')
end.uniq.map do |tagword| end.uniq.map do |tagword|
Tag.get(tagword) Tag.get(tagword)
Expand Down

0 comments on commit 6cb09f9

Please sign in to comment.