mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:19:53 +01:00
Ensure hard_wrap
renderer option is respected
This commit is contained in:
parent
e85aaadb63
commit
062ca6e65a
2 changed files with 4 additions and 4 deletions
|
@ -18,10 +18,6 @@ class FlavoredMarkdown < Redcarpet::Render::HTML
|
||||||
paragraph text
|
paragraph text
|
||||||
end
|
end
|
||||||
|
|
||||||
def paragraph(text)
|
|
||||||
"<p>#{text}</p>"
|
|
||||||
end
|
|
||||||
|
|
||||||
def raw_html(raw_html)
|
def raw_html(raw_html)
|
||||||
Rack::Utils.escape_html raw_html
|
Rack::Utils.escape_html raw_html
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,6 +31,10 @@ describe MarkdownHelper, type: :helper do
|
||||||
it "should escape HTML tags" do
|
it "should escape HTML tags" do
|
||||||
expect(markdown("I'm <h1>a test</h1>")).to eq("<p>I'm <h1>a test</h1></p>")
|
expect(markdown("I'm <h1>a test</h1>")).to eq("<p>I'm <h1>a test</h1></p>")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should turn line breaks into <br> tags" do
|
||||||
|
expect(markdown("Some\ntext")).to eq("<p>Some<br>\ntext</p>")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#strip_markdown" do
|
describe "#strip_markdown" do
|
||||||
|
|
Loading…
Reference in a new issue