Fix issue #2213: multi-underscore hashtags no longer get Markdown <em>phasis applied.

This commit is contained in:
Pistos 2011-11-01 23:35:34 -04:00
parent e912bf3eda
commit db4bfb73a9
2 changed files with 20 additions and 1 deletions

View file

@ -13,7 +13,8 @@ module MarkdownifyHelper
:space_after_headers => true,
:strikethrough => true,
:superscript => true,
:tables => true
:tables => true,
:no_intra_emphasis => true,
}
render_options[:filter_html] = true

View file

@ -42,6 +42,24 @@ describe MarkdownifyHelper do
formatted.should =~ %r{<a href="/tags/markdown" class="tag">#markdown</a>}
end
it 'should leave multi-underscore tags intact' do
message = Factory.create(
:status_message,
:author => alice.person,
:text => "Here is a #multi_word tag"
)
formatted = markdownify(message)
formatted.should =~ %r{Here is a <a href="/tags/multi_word" class="tag">#multi_word</a> tag}
message = Factory.create(
:status_message,
:author => alice.person,
:text => "Here is a #multi_word_tag yo"
)
formatted = markdownify(message)
formatted.should =~ %r{Here is a <a href="/tags/multi_word_tag" class="tag">#multi_word_tag</a> yo}
end
it "should leave mentions intact" do
message = Factory.create(:status_message,
:author => alice.person,