-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Descriptionをmarkdownで書けるようにした kentaro/triglav#34 #40
Conversation
簡単なものでいいので
が
になるぐらいかな。あとは |
あと https://github.com/ged/bluecloth/blob/master/lib/bluecloth.rb#L65 |
なるほど。ちょっと勉強します… optionは対応しました。 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index be4601f..98df4dd 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -28,6 +28,7 @@ module ApplicationHelper
end
def markdown(text)
- BlueCloth.new(text).to_html.html_safe
+ options = [:escape_html => true, :auto_links => true,]
+ BlueCloth.new(text, *options).to_html.html_safe
end
end |
指摘の内容を修正しました… |
<p>hoge</p> | ||
EOF | ||
|
||
helper.markdown(markdown_text).should == html_text.chomp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(helper.markdown(markdown_text)).to be == html_text.chomp
にしてください。
@@ -0,0 +1,30 @@ | |||
require 'spec_helper' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
指摘もらった部分を修正するとコメントごと消えるんですね… |
|
Descriptionをmarkdownで書けるようにした #34
Great! Thanks!!1 |
http://192.168.25.37/gyazo/data/7bef06f87e472f8ae5e4f8a766f37709.png |
社内LANの貼らないようにw |
oops public repo でした失礼 |
#34 に対応しました…