module HTML class Pipeline # HTML filter that adds an 'id' attribute to all headers # in a document, so they can be accessed from a table of contents. # # Generates the Table of Contents, with links to each header. # # Examples # # TocPipeline = # HTML::Pipeline.new [ # HTML::Pipeline::TableOfContentsFilter # ] # # => # # orig = %(

Ice cube

is not for the pop chart

) # # => "

Ice cube

is not for the pop chart

" # result = {} # # => {} # TocPipeline.call(orig, {}, result) # # => {:toc=> ...} # result[:toc] # # => "