fix: 🐛 category & tag search regex to support thai character

This commit is contained in:
siriwatknp 2020-08-20 17:13:44 +07:00 committed by Alan Guo Xiang Tan
parent f08d440ea0
commit 1a2800ad07

View File

@ -478,7 +478,7 @@ class Search
end
end
advanced_filter(/^\#([\p{L}0-9\-:=]+)$/) do |posts, match|
advanced_filter(/^\#([\p{L}\p{M}0-9\-:=]+)$/) do |posts, match|
exact = true
@ -600,11 +600,11 @@ class Search
end
end
advanced_filter(/^tags?:([\p{L}0-9,\-_+]+)$/) do |posts, match|
advanced_filter(/^tags?:([\p{L}\p{M}0-9,\-_+]+)$/) do |posts, match|
search_tags(posts, match, positive: true)
end
advanced_filter(/^\-tags?:([\p{L}0-9,\-_+]+)$/) do |posts, match|
advanced_filter(/^\-tags?:([\p{L}\p{M}0-9,\-_+]+)$/) do |posts, match|
search_tags(posts, match, positive: false)
end