Permalink
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 44d48f6da818b98f0d3d5c1c1dab7dbfc3376582
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/impress_renderer.rb
View
@@ -55,7 +55,9 @@ def block_code code, lang
file = Tempfile.new(['mdpress','.dot'])
file << code
file.close
(Nokogiri(`dot #{file.path} -Tsvg`)/'svg').tap{|svg| svg.search('polygon').remove}.to_html
"<div class='dot-wrap'>" +
(Nokogiri(`dot #{file.path} -Tsvg`)/'svg').tap{|svg| svg.search('polygon').first.remove}.to_html +
"</div>"
elsif lang == 'notes'
"<div class='notes' style='display:none;'>#{code}</div>"
else

0 comments on commit 44d48f6

Please sign in to comment.