Sha256: 8e9e20888e2fa250f29db01101197285214f9ff0b57d6e92e31a61cc3cd1ba50

Contents?: true

Size: 1.5 KB

Versions: 21

Compression:

Stored size: 1.5 KB

Contents

# frozen_string_literal: true

module Bridgetown
  class Converter < Plugin
    # Public: Get or set the highlighter prefix. When an argument is specified,
    # the prefix will be set. If no argument is specified, the current prefix
    # will be returned.
    #
    # highlighter_prefix - The String prefix (default: nil).
    #
    # Returns the String prefix.
    def self.highlighter_prefix(highlighter_prefix = nil)
      unless defined?(@highlighter_prefix) && highlighter_prefix.nil?
        @highlighter_prefix = highlighter_prefix
      end
      @highlighter_prefix
    end

    # Public: Get or set the highlighter suffix. When an argument is specified,
    # the suffix will be set. If no argument is specified, the current suffix
    # will be returned.
    #
    # highlighter_suffix - The String suffix (default: nil).
    #
    # Returns the String suffix.
    def self.highlighter_suffix(highlighter_suffix = nil)
      unless defined?(@highlighter_suffix) && highlighter_suffix.nil?
        @highlighter_suffix = highlighter_suffix
      end
      @highlighter_suffix
    end

    # Initialize the converter.
    #
    # Returns an initialized Converter.
    def initialize(config = {})
      @config = config
    end

    # Get the highlighter prefix.
    #
    # Returns the String prefix.
    def highlighter_prefix
      self.class.highlighter_prefix
    end

    # Get the highlighter suffix.
    #
    # Returns the String suffix.
    def highlighter_suffix
      self.class.highlighter_suffix
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bridgetown-core-0.15.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.15.0.beta4 lib/bridgetown-core/converter.rb
bridgetown-core-0.15.0.beta3 lib/bridgetown-core/converter.rb
bridgetown-core-0.15.0.beta2 lib/bridgetown-core/converter.rb
bridgetown-core-0.15.0.beta1 lib/bridgetown-core/converter.rb
bridgetown-core-0.14.1 lib/bridgetown-core/converter.rb
bridgetown-core-0.14.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.13.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.12.1 lib/bridgetown-core/converter.rb
bridgetown-core-0.12.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.11.2 lib/bridgetown-core/converter.rb
bridgetown-core-0.11.1 lib/bridgetown-core/converter.rb
bridgetown-core-0.11.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.10.2 lib/bridgetown-core/converter.rb
bridgetown-core-0.10.1 lib/bridgetown-core/converter.rb
bridgetown-core-0.10.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.9.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.8.1 lib/bridgetown-core/converter.rb
bridgetown-core-0.8.0 lib/bridgetown-core/converter.rb
bridgetown-core-0.7.2 lib/bridgetown-core/converter.rb