Sha256: a9273abe9acae481b3f6ae7f7c2cab375a408e747081d8180da1f4ab647736f9

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

# frozen_string_literal: true

module Jekyll
  module Diagrams
    class WavedromBlock < Block
      def render_svg(code, config)
        command = build_command(config)

        render_with_tempfile(command, code) do |input, output|
          "--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.9.3 lib/jekyll-diagrams/wavedrom.rb
jekyll-diagrams-0.9.2 lib/jekyll-diagrams/wavedrom.rb