Commit 4865a129d5e747c50789ff36627e03e433c8edf5

Fix bug in identica group parsing & add tests.
  
8888 new.gsub!(/(^|\s)#(?:(?!39;)([A-Za-z0-9_\-]+|\.(?!\z|\s)))/, '\1#<a href="http://identi.ca/tag/\2">\2</a>')
8989
9090 # group regexp in laconica is /(?:^|\s)!([A-Za-z0-9]{1,64})
91 new.gsub!(/(?:!(\S+))/, '!<a href="http://identi.ca/group/
91 new.gsub!(/(?:!([A-Za-z0-9]+))/, '!<a href="http://identi.ca/group/
9292
9393 return new
9494end
  
142142 end
143143 end
144144
145 ['.', ',', '#', '?'].each do |char|
146 should "correctly parse group names ending in #{char}" do
147 assert_equal %Q(leading !<a href="http://identi.ca/group/group">group</a>#{char} end),
148 identicaify("leading !group#{char} end")
149 end
150 end
151
145152 should "not turn &#39; into a link" do
146153 assert_equal %q(&#39; #<a href="http://identi.ca/tag/stuff">stuff</a>),
147154 identicaify("&#39; #stuff")