Skip to content
Browse files
Wrap the dot output in a div for styling, and only remove the first p…
…olygon (the background) but not the rest.
  • Loading branch information
plexus committed Jun 7, 2013
1 parent a237234 commit 44d48f6
Showing 1 changed file with 3 additions and 1 deletion.
@@ -55,7 +55,9 @@ def block_code code, lang
file =['mdpress','.dot'])
file << code
(Nokogiri(`dot #{file.path} -Tsvg`)/'svg').tap{|svg|'polygon').remove}.to_html
"<div class='dot-wrap'>" +
(Nokogiri(`dot #{file.path} -Tsvg`)/'svg').tap{|svg|'polygon').first.remove}.to_html +
elsif lang == 'notes'
"<div class='notes' style='display:none;'>#{code}</div>"

0 comments on commit 44d48f6

Please sign in to comment.