Permalink
Browse files

Replaces \w with [[:alnum:]] to avoid acentuated tags to be split on …

…the accentuated character
  • Loading branch information...
fdv committed Dec 26, 2012
1 parent 8363c8a commit 6cb09f995b9f6cf3382de6420bbe956e72dd75a2
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/article.rb
View
@@ -246,7 +246,7 @@ def keywords_to_tags
Article.transaction do
tags.clear
tags <<
- keywords.to_s.scan(/((['"]).*?\2|[\.\w]+)/).collect do |x|
+ keywords.to_s.scan(/((['"]).*?\2|[\.[[:alnum:]]]+)/).collect do |x|
x.first.tr("\"'", '')
end.uniq.map do |tagword|
Tag.get(tagword)

0 comments on commit 6cb09f9

Please sign in to comment.