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 44d48f6da818b98f0d3d5c1c1dab7dbfc3376582
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/impress_renderer.rb
@@ -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.
You can’t perform that action at this time.