lib/markdown_converter.rb
def add_css_class(node, *new_class_names)
      class_names = (node['class'] || '').split(' ')
      return if new_class_names.all? { |klass| class_names.include?(klass) }
      class_names.concat(new_class_names)
      node['class'] = class_names.uniq.join(' ')
    end
# Private: adds a CSS class name to a node, respecting existing class
# names.
adds a CSS class name to a node, respecting existing class
names.
adds a CSS class name to a node respecting existing class names .
def add_css_class(node, *new_class_names)
      class_names = (node['class'] || '').split(' ')
      return if new_class_names.all? { |klass| class_names.include?(klass) }
      class_names.concat(new_class_names)
      node['class'] = class_names.uniq.join(' ')
    end
def add_css_class ( node , * new_class_names ) class_names = ( node [ 'class' ] || '' ) . split ( ' ' ) return if new_class_names . all? { | klass | class_names . include? ( klass ) } class_names . concat ( new_class_names ) node [ 'class' ] = class_names . uniq . join ( ' ' ) end
Private: adds a CSS class name to a node, respecting existing class
names.
Private : adds a CSS class name to a node respecting existing class names .
node
new_class_names