From 88e642ffdbc75e14f392e6b2d59bfdcde2db5290 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Mon, 21 Mar 2011 22:31:01 +0100 Subject: [PATCH] disallow _ in tags because they interfer with markdownify --- lib/diaspora/taggable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/diaspora/taggable.rb b/lib/diaspora/taggable.rb index 9704681ed..404b415bd 100644 --- a/lib/diaspora/taggable.rb +++ b/lib/diaspora/taggable.rb @@ -36,7 +36,7 @@ module Diaspora def format_tags(text, opts={}) return text if opts[:plain_text] - regex = /(^|\s)#(\w+)/ + regex = /(^|\s)#([a-zA-Z0-9\-]+)/ form_message = text.gsub(regex) do |matched_string| "#{$~[1]}##{$~[2]}" end