Skip to content

Commit 44d48f6

Browse files
committed
Wrap the dot output in a div for styling, and only remove the first polygon (the background) but not the rest.
1 parent a237234 commit 44d48f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/impress_renderer.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def block_code code, lang
5555
file = Tempfile.new(['mdpress','.dot'])
5656
file << code
5757
file.close
58-
(Nokogiri(`dot #{file.path} -Tsvg`)/'svg').tap{|svg| svg.search('polygon').remove}.to_html
58+
"<div class='dot-wrap'>" +
59+
(Nokogiri(`dot #{file.path} -Tsvg`)/'svg').tap{|svg| svg.search('polygon').first.remove}.to_html +
60+
"</div>"
5961
elsif lang == 'notes'
6062
"<div class='notes' style='display:none;'>#{code}</div>"
6163
else

0 commit comments

Comments
 (0)