method
convert_flow
v2_1_10 -
Show latest stable
- Class:
RDoc::Markup::ToHtmlSnippet
convert_flow(flow)public
Converts flow items flow
# File lib/rdoc/markup/to_html_snippet.rb, line 214
def convert_flow flow
throw :done if @characters >= @character_limit
res = []
@mask = 0
flow.each do |item|
case item
when RDoc::Markup::AttrChanger then
off_tags res, item
on_tags res, item
when String then
text = convert_string item
res << truncate(text)
when RDoc::Markup::Special then
text = convert_special item
res << truncate(text)
else
raise "Unknown flow element: #{item.inspect}"
end
if @characters >= @character_limit then
off_tags res, RDoc::Markup::AttrChanger.new(0, @mask)
break
end
end
res << ' ...' if @characters >= @character_limit
res.join
end Related methods
- Instance methods
- accept_heading
- accept_list_item_end
- accept_list_item_start
- accept_list_start
- accept_paragraph
- accept_verbatim
- add_paragraph
- convert
- convert_flow
- gen_url
- handle_special_CROSSREF
- handle_special_HARD_BREAK
- html_list_name
- list_item_start
- off_tags
- on_tags
- start_accepting
- truncate
- Class methods
- new