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
- .new ⇒ ToJoinedParagraph constructor Internal use only
Formatter
- Inherited
.gen_relative_url | Converts a target url to one that is relative to a given path. |
.new | Creates a new |
Instance Attribute Summary
Instance Method Summary
- #accept_block_quote(*node)
- #accept_heading(*node)
- #accept_list_end(*node)
- #accept_list_item_end(*node)
- #accept_list_item_start(*node)
- #accept_list_start(*node)
-
#accept_paragraph(paragraph)
Converts the parts of
paragraph
to a single entry. - #accept_raw(*node)
- #accept_rule(*node)
- #accept_table(*node)
- #accept_verbatim(*node)
- #end_accepting Internal use only
- #start_accepting Internal use only
Formatter
- Inherited
#accept_document | Adds |
#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 |
#add_tag | Add a new set of tags for an attribute. |
#annotate | Allows |
#convert | Marks up |
#convert_flow | Converts flow items |
#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 |
#on_tags | Turns on tags for |
#parse_url | Extracts and a scheme, url and an anchor id from |
#tt? | Is |
Constructor Details
.new ⇒ ToJoinedParagraph
# 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.
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 25
def accept_paragraph paragraph parts = paragraph.parts.chunk do |part| String === part end.flat_map do |string, chunk| string ? chunk.join.rstrip : chunk end 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_table(*node)
[ GitHub ]# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 44
alias accept_table ignore
#accept_verbatim(*node)
[ GitHub ]# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 43
alias accept_verbatim ignore
#end_accepting
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 19
def end_accepting # :nodoc: end
#start_accepting
# File 'lib/rdoc/markup/to_joined_paragraph.rb', line 16
def start_accepting # :nodoc: end