Class: Maruku
- Inherits:
-
MaRuKu::MDDocument
- Object
- MaRuKu::MDElement
- MaRuKu::MDDocument
- Maruku
- Defined in:
- lib/maruku/maruku.rb,
lib/maruku.rb
Overview
The public interface for Maruku.
Maruku.new(“## Header ##”).to_html # => “<h2 id=‘header’>header</h2>”
Constant Summary
Constants inherited from MaRuKu::MDDocument
MaRuKu::MDDocument::T2_Handling
Constants included from MaRuKu::In::Markdown::SpanLevelParser
MaRuKu::In::Markdown::SpanLevelParser::CharSource, MaRuKu::In::Markdown::SpanLevelParser::EscapedCharInInlineCode, MaRuKu::In::Markdown::SpanLevelParser::EscapedCharInQuotes, MaRuKu::In::Markdown::SpanLevelParser::EscapedCharInText, MaRuKu::In::Markdown::SpanLevelParser::IgnoreWikiLinks
Constants included from MaRuKu::Strings
Constants included from MaRuKu::In::Markdown
MaRuKu::In::Markdown::BlockExtensions, MaRuKu::In::Markdown::SpanExtensions, MaRuKu::In::Markdown::SpanExtensionsTrigger
Constants inherited from MaRuKu::MDElement
MaRuKu::MDElement::INSPECT_FORMS
Constants included from MaRuKu::Errors
Constants included from MaRuKu::Out::Latex
MaRuKu::Out::Latex::LATEX_ADD_SLASH, MaRuKu::Out::Latex::LATEX_TO_CHARCODE, MaRuKu::Out::Latex::Latex_preamble_enc_cjk, MaRuKu::Out::Latex::Latex_preamble_enc_utf8, MaRuKu::Out::Latex::OtherGoodies, MaRuKu::Out::Latex::SAFE_CHARS
Constants included from MaRuKu::Out::HTML
MaRuKu::Out::HTML::HTML4Attributes, MaRuKu::Out::HTML::Xhtml11_mathml2_svg11
Constants included from MaRuKu::Out::Markdown
MaRuKu::Out::Markdown::DefaultLineLength
Constants included from MaRuKu
MaRuKu::Abbreviation, MaRuKu::AttributeDefinitionList, MaRuKu::BLOCK_TAGS, MaRuKu::Definition, MaRuKu::EMailAddress, MaRuKu::FootnoteText, MaRuKu::Globals, MaRuKu::HTML_INLINE_ELEMS, MaRuKu::IncompleteLink, MaRuKu::InlineAttributeList, MaRuKu::LinkRegex, MaRuKu::MARUKU_URL, MaRuKu::MarukuURL, MaRuKu::S5_Fancy, MaRuKu::S5_external, MaRuKu::TableSeparator, MaRuKu::VERSION, MaRuKu::Version
Instance Attribute Summary
Attributes inherited from MaRuKu::MDDocument
#abbreviations, #ald, #eqid2eq, #footnotes, #footnotes_order, #header_ids, #id_counter, #refid2ref, #refs, #toc
Attributes included from MaRuKu::Out::Latex::MDDocumentExtensions
Attributes inherited from MaRuKu::MDElement
#al, #attributes, #children, #doc, #meta_priv, #node_type
Instance Method Summary collapse
-
#initialize(s = nil, meta = {}) ⇒ Maruku
constructor
A new instance of Maruku.
- #to_s ⇒ Object
Methods inherited from MaRuKu::MDDocument
#create_toc, #is_math_enabled?, #old_md, #s5_theme, #t2_block_paragraph, #t2_parse, #t2_parse_blocks, #t2_parse_span, #to_md, #to_s5
Methods included from MaRuKu::Out::Latex::MDDocumentExtensions
Methods included from MaRuKu::In::Markdown::BlockLevelParser
#count_columns, #element_is_non_inline_html?, #eventually_comes_a_def_list, #execute_code_blocks, #expand_attribute_list, #find_colspan, #parse_blocks, #parse_doc, #parse_text_as_markdown, #pick_apart_non_inline_html, #read_abbreviation, #read_ald, #read_code, #read_definition, #read_footnote_text, #read_header12, #read_header3, #read_indented_content, #read_list_item, #read_paragraph, #read_quote, #read_raw_html, #read_ref_definition, #read_table, #read_text_material, #read_xml_instruction, #safe_execute_code, #search_abbreviations, #split_cells, #substitute_markdown_inside_raw_html
Methods included from MaRuKu::In::Markdown::SpanLevelParser
#extension_meta, #interpret_extension, #md_al, #merge_ial, #parse_span, #read_attribute_list, #read_em, #read_email_el, #read_emstrong, #read_footnote_ref, #read_image, #read_inline_code, #read_inline_html, #read_link, #read_quoted, #read_quoted_or_unquoted, #read_ref_id, #read_simple, #read_span, #read_strong, #read_url, #read_url_el, #read_xml_instr_span
Methods included from MaRuKu::Helpers
#md_abbr, #md_abbr_def, #md_ald, #md_br, #md_code, #md_codeblock, #md_el, #md_em, #md_email, #md_emstrong, #md_entity, #md_foot_ref, #md_footnote, #md_header, #md_hrule, #md_html, #md_ial, #md_im_image, #md_im_link, #md_image, #md_li, #md_link, #md_par, #md_quote, #md_ref_def, #md_strong, #md_url, #md_xml_instr
Methods included from MaRuKu::Strings
#parse_email_headers, #sanitize_ref_id, #spaces_before_first_char, #split_lines, #strip_indent, #unquote
Methods included from MaRuKu::In::Markdown
#any_matching_block_extension?, #check_block_extensions, #check_span_extensions, register_block_extension, register_span_extension
Methods inherited from MaRuKu::MDElement
#==, #children_to_s, #each_element, #generate_id, #get_setting, #inspect, #md_div, #md_equation, #md_inline_math, #replace_each_string
Methods included from MaRuKu::Errors
#maruku_error, #maruku_recover, #raise_error, #tell_user
Methods included from MaRuKu::Out::Latex
#array_to_latex, #children_to_latex, #latex_color, #latex_escape, #render_latex_signature, #string_to_latex, #to_latex, #to_latex_abbr, #to_latex_cell, #to_latex_citation, #to_latex_code, #to_latex_definition, #to_latex_definition_list, #to_latex_div, #to_latex_divref, #to_latex_document, #to_latex_email_address, #to_latex_emphasis, #to_latex_entity, #to_latex_eqref, #to_latex_equation, #to_latex_footnote_reference, #to_latex_head_cell, #to_latex_header, #to_latex_hrule, #to_latex_im_link, #to_latex_image, #to_latex_immediate_link, #to_latex_inline_code, #to_latex_inline_math, #to_latex_li, #to_latex_linebreak, #to_latex_link, #to_latex_ol, #to_latex_paragraph, #to_latex_quote, #to_latex_raw_html, #to_latex_strong, #to_latex_table, #to_latex_ul, #wrap_as_environment, #wrap_as_span
Methods included from MaRuKu::Out::HTML
#add_class_to, #add_css_to, #add_ws, #adjust_png, #array_to_html, #children_to_html, #convert_to_mathml_blahtex, #convert_to_mathml_itex2mml, #convert_to_mathml_none, #convert_to_mathml_ritex, #convert_to_png_blahtex, #convert_to_png_none, #day_suffix, escapeHTML, #html_element, #maruku_html_signature, #nice_date, #obfuscate, #pixels_per_ex, #render_footnotes, #render_mathml, #render_png, #render_section_number, #section_number, #to_html, #to_html_abbr, #to_html_cell, #to_html_citation, #to_html_code, #to_html_code_using_pre, #to_html_definition, #to_html_definition_data, #to_html_definition_list, #to_html_definition_term, #to_html_div, #to_html_divref, #to_html_document, #to_html_document_tree, #to_html_email_address, #to_html_emphasis, #to_html_entity, #to_html_eqref, #to_html_equation, #to_html_footnote_reference, #to_html_head_cell, #to_html_header, #to_html_hrule, #to_html_im_image, #to_html_im_link, #to_html_image, #to_html_immediate_link, #to_html_inline_code, #to_html_inline_math, #to_html_li, #to_html_linebreak, #to_html_link, #to_html_ol, #to_html_paragraph, #to_html_quote, #to_html_raw_html, #to_html_ref_definition, #to_html_strong, #to_html_table, #to_html_ul, #to_html_xml_instr, #to_latex_ref_definition, #wrap_as_element, #xelem, #xml_newline, #xtext
Methods included from MaRuKu::Out::Markdown
#add_indent, #array_to_md, #children_to_md, #mysplit, #to_md, #to_md_abbr_def, #to_md_code, #to_md_email_address, #to_md_emphasis, #to_md_entity, #to_md_header, #to_md_hrule, #to_md_im_image, #to_md_im_link, #to_md_image, #to_md_immediate_link, #to_md_inline_code, #to_md_linebreak, #to_md_link, #to_md_ol, #to_md_paragraph, #to_md_quote, #to_md_ref_definition, #to_md_strong, #to_md_ul, #wrap
Methods included from MaRuKu
#markdown_extra?, #new_meta_data?, textile2
Constructor Details
#initialize(s = nil, meta = {}) ⇒ Maruku
Returns a new instance of Maruku.
7 8 9 10 11 |
# File 'lib/maruku/maruku.rb', line 7 def initialize(s = nil, = {}) super() self.attributes.merge! parse_doc(s) if s end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 |
# File 'lib/maruku/maruku.rb', line 13 def to_s warn "Maruku#to_s is deprecated and will be removed or changed in a near-future version of Maruku." super end |