<commit_before>require_relative '../diagram_converter'
require_relative '../util/cli'
require_relative '../util/cli_generator'
require_relative '../util/platform'

module Asciidoctor
  module Diagram
    # @private
    class MermaidConverter
      include DiagramConverter
      include CliGenerator


      def supported_formats
        [:png, :svg]
      end

      def collect_options(source, name)
        options = {}

        options[:css] = source.attr('css')
        options[:gantt_config] = source.attr(['ganttconfig', 'gantt-config'])
        options[:seq_config] = source.attr(['sequenceconfig', 'sequence-config'])
        options[:width] = source.attr('width')
        options[:height] = source.attr('height')
        options[:theme] = source.attr('theme')
        options[:background] = source.attr('background')
        options[:config] = source.attr('config')
        options[:puppeteer_config] = source.attr(['puppeteerconfig', 'puppeteer-config'])

        options
      end

      def convert(source, format, options)
        opts = {}

        css = options[:css]
        if css
          opts[:css] = source.resolve_path(css)
        end

        gantt_config = options[:gantt_config]
        if gantt_config
          opts[:gantt] = source.resolve_path(gantt_config)
        end

        seq_config = options[:seq_config]
        if seq_config<commit_msg>Remove superfluous parameter in Mermaid converter<commit_after>require_relative '../diagram_converter'
require_relative '../util/cli'
require_relative '../util/cli_generator'
require_relative '../util/platform'

module Asciidoctor
  module Diagram
    # @private
    class MermaidConverter
      include DiagramConverter
      include CliGenerator


      def supported_formats
        [:png, :svg]
      end

      def collect_options(source)
        options = {}

        options[:css] = source.attr('css')
        options[:gantt_config] = source.attr(['ganttconfig', 'gantt-config'])
        options[:seq_config] = source.attr(['sequenceconfig', 'sequence-config'])
        options[:width] = source.attr('width')
        options[:height] = source.attr('height')
        options[:theme] = source.attr('theme')
        options[:background] = source.attr('background')
        options[:config] = source.attr('config')
        options[:puppeteer_config] = source.attr(['puppeteerconfig', 'puppeteer-config'])

        options
      end

      def convert(source, format, options)
        opts = {}

        css = options[:css]
        if css
          opts[:css] = source.resolve_path(css)
        end

        gantt_config = options[:gantt_config]
        if gantt_config
          opts[:gantt] = source.resolve_path(gantt_config)
        end

        seq_config = options[:seq_config]
        if seq_config
{'fraction_non_alphanumeric': 0.12248563218390805, 'fraction_numerical': 0.0, 'mean_word_length': 2.7282463186077646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1779215', 'n_tokens_mistral': 811, 'n_tokens_neox': 787, 'n_words': 151}