Fix issue #2213: multi-underscore hashtags no longer get Markdown <em>phasis applied.
This commit is contained in:
parent
e912bf3eda
commit
db4bfb73a9
2 changed files with 20 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue