Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…the accentuated character
  • Loading branch information...
commit 6cb09f995b9f6cf3382de6420bbe956e72dd75a2 1 parent 8363c8a
@fdv fdv authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/models/article.rb
View
2  app/models/article.rb
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.