class RDoc::Markup::ToHtml

Outputs RDoc markup as HTML.

Constants

HTML_CHARACTERS_REGEXP
HTML_CHARACTER_ALIASES
TO_HTML_CHARACTERS

Maps an encoding to a Hash of characters properly transcoded for that encoding.

See also encode_fallback.

Public Class Methods

Transcodes character to encoding with a fallback character.

# File lib/rdoc/markup/to_html.rb, line 82
def self.encode_fallback(character, encoding, fallback)
  character.encode(
    encoding,
    fallback: { character => fallback },
    undef: :replace,
    replace: fallback
  )
end

Creates a new formatter that will output HTML

Calls superclass method RDoc::Markup::Formatter::new
# File lib/rdoc/markup/to_html.rb, line 130
def initialize(pipe: false, output_decoration: true)
  super()

  @pipe = pipe
  @output_decoration = output_decoration
  @code_object = nil
  @from_path = ''
  @in_list_entry = nil
  @list = nil
  @th = nil
  @quote_converter = nil
  @in_tidylink_label = false
  @hard_break = "<br>\n"

  init_regexp_handlings
end

Regexp Handling

Constants

UNSAFE_URL_SCHEME_REGEXP

URL schemes that are not linked because they can run scripts or open local files. Links to them are rendered as their text only.

Utilities

Constants

LIST_TYPE_TO_HTML

Maps RDoc::Markup::Parser::LIST_TOKENS types to HTML tags

Attributes

The RDoc::CodeObject HTML is being generated for. This is used to generate namespaced URI fragments

Path to this document for relative links

Visitor