lib/brief/document/rendering.rb in brief-1.17.8 vs lib/brief/document/rendering.rb in brief-1.17.9
- old
+ new
@@ -17,9 +17,18 @@
module Brief
class Document
module Rendering
extend ActiveSupport::Concern
+ module ClassMethods
+ def render_gfm(content)
+ html = Github::Markdown.render_pure_gfm(content)
+ fragment = Nokogiri::HTML.fragment(html)
+ fragment.css("p br").remove
+ fragment.to_html
+ end
+ end
+
def script_preamble
<<-EOF
<script type="text/javascript">
if(typeof(global)==="undefined"){
global = window