Class: Homebrew::Manpages::Converter::Kramdown Private
- Inherits:
 - 
      Kramdown::Converter::Kramdown
      
        
- Object
 - Kramdown::Converter::Kramdown
 - Homebrew::Manpages::Converter::Kramdown
 
 
- Defined in:
 - manpages/converter/kramdown.rb
 
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Converts our Kramdown-like input to pure Kramdown.
Instance Method Summary collapse
- #convert_a(element, options) ⇒ Object private
 - #convert_variable(element, _options) ⇒ Object private
 - 
  
    
      #initialize(root, options)  ⇒ Kramdown 
    
    
  
  
  
    constructor
  
  
  
  
  
  private
  
    
A new instance of Kramdown.
 
Constructor Details
#initialize(root, options) ⇒ Kramdown
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns a new instance of Kramdown.
      11 12 13  | 
    
      # File 'manpages/converter/kramdown.rb', line 11 def initialize(root, ) super(root, .merge(line_width: 80)) end  | 
  
Instance Method Details
#convert_a(element, options) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      19 20 21 22 23 24 25 26 27  | 
    
      # File 'manpages/converter/kramdown.rb', line 19 def convert_a(element, ) text = inner(element, ) if element.attr["href"] == text # Don't duplicate the URL if the link text is the same as the URL. "<#{text}>" else super end end  | 
  
#convert_variable(element, _options) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
      15 16 17  | 
    
      # File 'manpages/converter/kramdown.rb', line 15 def convert_variable(element, ) "*`#{element.value}`*" end  |