Sha256: b091e3c022b4ed32e65db90c3b4d65fe00eddda69321f1b5a06468fd4c38ff8b

Contents?: true

Size: 453 Bytes

Versions: 2

Compression:

Stored size: 453 Bytes

Contents

module Jekyll
    module Diagrams
      class WavedromBlock < Block
        def render_svg(code, config)
          render_with_tempfile(build_command(config), code) do |command, input, output|
            "#{command} --input #{input} --svg #{output}"
          end
        end
  
        def build_command(config)
          'wavedrom-cli'
        end
      end
    end
  end
  
  Liquid::Template.register_tag(:wavedrom, Jekyll::Diagrams::WavedromBlock)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-diagrams-0.7.1 lib/jekyll-diagrams/wavedrom.rb
jekyll-diagrams-0.7.0 lib/jekyll-diagrams/wavedrom.rb