Module: Pygments::Ext::BlockStyles

Defined in:
lib/asciidoctor/pdf/ext/pygments.rb

Constant Summary collapse

BlockSelectorRx =
/^\.highlight *\{([^}]+?)\}/
HighlightBackgroundColorRx =
/^\.highlight +\.hll +{ *background(?:-color)?: *#(\h{6})/
ColorPropertiesRx =
/(?:^|;) *(background(?:-color)?|color): *#?(\h{6}) *(?=$|;)/

Class Method Summary collapse

Class Method Details

.available?(style) ⇒ Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/asciidoctor/pdf/ext/pygments.rb', line 27

def self.available? style
  (@available ||= ::Pygments.styles.to_set).include? style
end

.for(style) ⇒ Object



31
32
33
# File 'lib/asciidoctor/pdf/ext/pygments.rb', line 31

def self.for style
  @cache[style]
end