123456789_123456789_123456789_123456789_123456789_

Class: RDoc::Markup::ToJoinedParagraph

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Formatter
Instance Chain:
self, Formatter
Inherits: RDoc::Markup::Formatter
Defined in: lib/rdoc/markup/to_joined_paragraph.rb

Overview

Joins the parts of an Paragraph into a single String.

This allows for easier maintenance and testing of ::RDoc::Markdown support.

This formatter only works on Paragraph instances. Attempting to process other markup syntax items will not work.

Class Method Summary

Formatter - Inherited

.gen_relative_url

Converts a target url to one that is relative to a given path.

.new

Creates a new Formatter.

Instance Attribute Summary

Formatter - Inherited

#in_tt?

Are we currently inside tt tags?

Instance Method Summary

Formatter - Inherited

#accept_document

Adds document to the output.

#add_regexp_handling_RDOCLINK

Adds a regexp handling for links of the form rdoc-…:

#add_regexp_handling_TIDYLINK

Adds a regexp handling for links of the form <text> and <#add_tag

Add a new set of tags for an attribute.

#annotate

Allows tag to be decorated with additional information.

#convert

Marks up content

#convert_flow

Converts flow items flow

#convert_regexp_handling

Converts added regexp handlings.

#convert_string

Converts a string to be fancier if desired.

#ignore

Use ignore in your subclass to ignore the content of a node.

#off_tags

Turns off tags for item on res

#on_tags

Turns on tags for item on res

#parse_url

Extracts and a scheme, url and an anchor id from url and returns them.

#tt?

Is tag a tt tag?

Constructor Details

.newToJoinedParagraph

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 12

def initialize # :nodoc:
  super nil
end

Instance Method Details

#accept_block_quote(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 35

alias accept_block_quote     ignore

#accept_heading(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 36

alias accept_heading         ignore

#accept_list_end(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 37

alias accept_list_end        ignore

#accept_list_item_end(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 38

alias accept_list_item_end   ignore

#accept_list_item_start(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 39

alias accept_list_item_start ignore

#accept_list_start(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 40

alias accept_list_start      ignore

#accept_paragraph(paragraph)

Converts the parts of paragraph to a single entry.

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 25

def accept_paragraph paragraph
  parts = paragraph.parts.chunk do |part|
    String === part
  end.map do |string, chunk|
    string ? chunk.join.rstrip : chunk
  end.flatten

  paragraph.parts.replace parts
end

#accept_raw(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 41

alias accept_raw             ignore

#accept_rule(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 42

alias accept_rule            ignore

#accept_verbatim(*node)

[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 43

alias accept_verbatim        ignore

#end_accepting

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 19

def end_accepting # :nodoc:
end

#start_accepting

This method is for internal use only.
[ GitHub ]

  
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 16

def start_accepting # :nodoc:
end