gitdown 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -0
- data/COPYING +24 -0
- data/GPL +674 -0
- data/README +43 -0
- data/Rakefile +370 -0
- data/VERSION +1 -0
- data/benchmark/benchmark.rb +34 -0
- data/benchmark/benchmark.sh +74 -0
- data/benchmark/generate_data.rb +119 -0
- data/benchmark/mdbasics.text +306 -0
- data/benchmark/mdsyntax.text +888 -0
- data/benchmark/testing.sh +9 -0
- data/benchmark/timing.sh +10 -0
- data/bin/kramdown +78 -0
- data/data/kramdown/document.html +18 -0
- data/data/kramdown/document.latex +43 -0
- data/doc/default.scss.css +530 -0
- data/doc/default.template +80 -0
- data/doc/documentation.page +71 -0
- data/doc/index.page +98 -0
- data/doc/installation.page +88 -0
- data/doc/links.markdown +6 -0
- data/doc/news.feed +10 -0
- data/doc/news.page +28 -0
- data/doc/quickref.page +585 -0
- data/doc/syntax.page +1644 -0
- data/doc/tests.page +52 -0
- data/doc/virtual +2 -0
- data/lib/kramdown.rb +23 -0
- data/lib/kramdown/compatibility.rb +35 -0
- data/lib/kramdown/converter.rb +41 -0
- data/lib/kramdown/converter/base.rb +169 -0
- data/lib/kramdown/converter/html.rb +410 -0
- data/lib/kramdown/converter/kramdown.rb +422 -0
- data/lib/kramdown/converter/latex.rb +607 -0
- data/lib/kramdown/converter/toc.rb +82 -0
- data/lib/kramdown/document.rb +117 -0
- data/lib/kramdown/element.rb +524 -0
- data/lib/kramdown/error.rb +30 -0
- data/lib/kramdown/options.rb +373 -0
- data/lib/kramdown/parser.rb +40 -0
- data/lib/kramdown/parser/base.rb +136 -0
- data/lib/kramdown/parser/github_markdown.rb +44 -0
- data/lib/kramdown/parser/github_markdown/github_codeblock.rb +44 -0
- data/lib/kramdown/parser/html.rb +570 -0
- data/lib/kramdown/parser/kramdown.rb +338 -0
- data/lib/kramdown/parser/kramdown/abbreviation.rb +71 -0
- data/lib/kramdown/parser/kramdown/autolink.rb +53 -0
- data/lib/kramdown/parser/kramdown/blank_line.rb +43 -0
- data/lib/kramdown/parser/kramdown/block_boundary.rb +46 -0
- data/lib/kramdown/parser/kramdown/blockquote.rb +51 -0
- data/lib/kramdown/parser/kramdown/codeblock.rb +63 -0
- data/lib/kramdown/parser/kramdown/codespan.rb +56 -0
- data/lib/kramdown/parser/kramdown/emphasis.rb +70 -0
- data/lib/kramdown/parser/kramdown/eob.rb +39 -0
- data/lib/kramdown/parser/kramdown/escaped_chars.rb +38 -0
- data/lib/kramdown/parser/kramdown/extensions.rb +204 -0
- data/lib/kramdown/parser/kramdown/footnote.rb +74 -0
- data/lib/kramdown/parser/kramdown/header.rb +68 -0
- data/lib/kramdown/parser/kramdown/horizontal_rule.rb +39 -0
- data/lib/kramdown/parser/kramdown/html.rb +169 -0
- data/lib/kramdown/parser/kramdown/html_entity.rb +44 -0
- data/lib/kramdown/parser/kramdown/line_break.rb +38 -0
- data/lib/kramdown/parser/kramdown/link.rb +148 -0
- data/lib/kramdown/parser/kramdown/list.rb +240 -0
- data/lib/kramdown/parser/kramdown/math.rb +64 -0
- data/lib/kramdown/parser/kramdown/paragraph.rb +63 -0
- data/lib/kramdown/parser/kramdown/smart_quotes.rb +214 -0
- data/lib/kramdown/parser/kramdown/table.rb +178 -0
- data/lib/kramdown/parser/kramdown/typographic_symbol.rb +52 -0
- data/lib/kramdown/parser/markdown.rb +69 -0
- data/lib/kramdown/utils.rb +37 -0
- data/lib/kramdown/utils/entities.rb +348 -0
- data/lib/kramdown/utils/html.rb +85 -0
- data/lib/kramdown/utils/ordered_hash.rb +100 -0
- data/lib/kramdown/version.rb +28 -0
- data/setup.rb +1585 -0
- data/test/run_tests.rb +59 -0
- data/test/test_files.rb +197 -0
- data/test/testcases/block/01_blank_line/spaces.html +1 -0
- data/test/testcases/block/01_blank_line/spaces.text +3 -0
- data/test/testcases/block/01_blank_line/tabs.html +1 -0
- data/test/testcases/block/01_blank_line/tabs.text +6 -0
- data/test/testcases/block/02_eob/beginning.html +1 -0
- data/test/testcases/block/02_eob/beginning.text +3 -0
- data/test/testcases/block/02_eob/end.html +1 -0
- data/test/testcases/block/02_eob/end.text +3 -0
- data/test/testcases/block/02_eob/middle.html +1 -0
- data/test/testcases/block/02_eob/middle.text +5 -0
- data/test/testcases/block/03_paragraph/indented.html +18 -0
- data/test/testcases/block/03_paragraph/indented.text +19 -0
- data/test/testcases/block/03_paragraph/no_newline_at_end.html +5 -0
- data/test/testcases/block/03_paragraph/no_newline_at_end.text +5 -0
- data/test/testcases/block/03_paragraph/one_para.html +1 -0
- data/test/testcases/block/03_paragraph/one_para.text +1 -0
- data/test/testcases/block/03_paragraph/two_para.html +4 -0
- data/test/testcases/block/03_paragraph/two_para.text +4 -0
- data/test/testcases/block/04_header/atx_header.html +37 -0
- data/test/testcases/block/04_header/atx_header.text +34 -0
- data/test/testcases/block/04_header/atx_header_no_newline_at_end.html +1 -0
- data/test/testcases/block/04_header/atx_header_no_newline_at_end.text +1 -0
- data/test/testcases/block/04_header/setext_header.html +30 -0
- data/test/testcases/block/04_header/setext_header.html.19 +30 -0
- data/test/testcases/block/04_header/setext_header.text +36 -0
- data/test/testcases/block/04_header/setext_header_no_newline_at_end.html +1 -0
- data/test/testcases/block/04_header/setext_header_no_newline_at_end.text +2 -0
- data/test/testcases/block/04_header/with_auto_id_prefix.html +3 -0
- data/test/testcases/block/04_header/with_auto_id_prefix.options +2 -0
- data/test/testcases/block/04_header/with_auto_id_prefix.text +3 -0
- data/test/testcases/block/04_header/with_auto_ids.html +17 -0
- data/test/testcases/block/04_header/with_auto_ids.options +1 -0
- data/test/testcases/block/04_header/with_auto_ids.text +19 -0
- data/test/testcases/block/05_blockquote/indented.html +25 -0
- data/test/testcases/block/05_blockquote/indented.text +14 -0
- data/test/testcases/block/05_blockquote/lazy.html +34 -0
- data/test/testcases/block/05_blockquote/lazy.text +20 -0
- data/test/testcases/block/05_blockquote/nested.html +10 -0
- data/test/testcases/block/05_blockquote/nested.text +6 -0
- data/test/testcases/block/05_blockquote/no_newline_at_end.html +4 -0
- data/test/testcases/block/05_blockquote/no_newline_at_end.text +2 -0
- data/test/testcases/block/05_blockquote/very_long_line.html +3 -0
- data/test/testcases/block/05_blockquote/very_long_line.text +1 -0
- data/test/testcases/block/05_blockquote/with_code_blocks.html +15 -0
- data/test/testcases/block/05_blockquote/with_code_blocks.text +11 -0
- data/test/testcases/block/06_codeblock/error.html +4 -0
- data/test/testcases/block/06_codeblock/error.text +4 -0
- data/test/testcases/block/06_codeblock/lazy.html +4 -0
- data/test/testcases/block/06_codeblock/lazy.text +5 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end.html +2 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end.text +1 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end_1.html +2 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end_1.text +2 -0
- data/test/testcases/block/06_codeblock/normal.html +13 -0
- data/test/testcases/block/06_codeblock/normal.text +10 -0
- data/test/testcases/block/06_codeblock/tilde_syntax.html +7 -0
- data/test/testcases/block/06_codeblock/tilde_syntax.text +9 -0
- data/test/testcases/block/06_codeblock/whitespace.html +3 -0
- data/test/testcases/block/06_codeblock/whitespace.text +3 -0
- data/test/testcases/block/06_codeblock/with_blank_line.html +13 -0
- data/test/testcases/block/06_codeblock/with_blank_line.text +12 -0
- data/test/testcases/block/06_codeblock/with_eob_marker.html +6 -0
- data/test/testcases/block/06_codeblock/with_eob_marker.text +5 -0
- data/test/testcases/block/06_codeblock/with_ial.html +6 -0
- data/test/testcases/block/06_codeblock/with_ial.text +5 -0
- data/test/testcases/block/07_horizontal_rule/error.html +7 -0
- data/test/testcases/block/07_horizontal_rule/error.html.19 +7 -0
- data/test/testcases/block/07_horizontal_rule/error.text +7 -0
- data/test/testcases/block/07_horizontal_rule/normal.html +17 -0
- data/test/testcases/block/07_horizontal_rule/normal.text +17 -0
- data/test/testcases/block/07_horizontal_rule/sepspaces.html +3 -0
- data/test/testcases/block/07_horizontal_rule/sepspaces.text +3 -0
- data/test/testcases/block/07_horizontal_rule/septabs.html +3 -0
- data/test/testcases/block/07_horizontal_rule/septabs.text +3 -0
- data/test/testcases/block/08_list/escaping.html +17 -0
- data/test/testcases/block/08_list/escaping.text +17 -0
- data/test/testcases/block/08_list/item_ial.html +10 -0
- data/test/testcases/block/08_list/item_ial.text +8 -0
- data/test/testcases/block/08_list/lazy.html +39 -0
- data/test/testcases/block/08_list/lazy.text +29 -0
- data/test/testcases/block/08_list/list_and_hr.html +9 -0
- data/test/testcases/block/08_list/list_and_hr.text +5 -0
- data/test/testcases/block/08_list/list_and_others.html +40 -0
- data/test/testcases/block/08_list/list_and_others.text +26 -0
- data/test/testcases/block/08_list/mixed.html +117 -0
- data/test/testcases/block/08_list/mixed.text +66 -0
- data/test/testcases/block/08_list/nested.html +17 -0
- data/test/testcases/block/08_list/nested.text +7 -0
- data/test/testcases/block/08_list/other_first_element.html +39 -0
- data/test/testcases/block/08_list/other_first_element.text +18 -0
- data/test/testcases/block/08_list/simple_ol.html +19 -0
- data/test/testcases/block/08_list/simple_ol.text +13 -0
- data/test/testcases/block/08_list/simple_ul.html +48 -0
- data/test/testcases/block/08_list/simple_ul.text +36 -0
- data/test/testcases/block/08_list/single_item.html +3 -0
- data/test/testcases/block/08_list/single_item.text +1 -0
- data/test/testcases/block/08_list/special_cases.html +55 -0
- data/test/testcases/block/08_list/special_cases.text +35 -0
- data/test/testcases/block/09_html/comment.html +18 -0
- data/test/testcases/block/09_html/comment.text +15 -0
- data/test/testcases/block/09_html/content_model/deflists.html +6 -0
- data/test/testcases/block/09_html/content_model/deflists.options +1 -0
- data/test/testcases/block/09_html/content_model/deflists.text +6 -0
- data/test/testcases/block/09_html/content_model/tables.html +14 -0
- data/test/testcases/block/09_html/content_model/tables.options +1 -0
- data/test/testcases/block/09_html/content_model/tables.text +14 -0
- data/test/testcases/block/09_html/html_and_codeblocks.html +15 -0
- data/test/testcases/block/09_html/html_and_codeblocks.options +1 -0
- data/test/testcases/block/09_html/html_and_codeblocks.text +13 -0
- data/test/testcases/block/09_html/html_and_headers.html +5 -0
- data/test/testcases/block/09_html/html_and_headers.text +6 -0
- data/test/testcases/block/09_html/html_to_native/code.html +10 -0
- data/test/testcases/block/09_html/html_to_native/code.text +9 -0
- data/test/testcases/block/09_html/html_to_native/comment.html +7 -0
- data/test/testcases/block/09_html/html_to_native/comment.text +8 -0
- data/test/testcases/block/09_html/html_to_native/emphasis.html +6 -0
- data/test/testcases/block/09_html/html_to_native/emphasis.text +6 -0
- data/test/testcases/block/09_html/html_to_native/entity.html +1 -0
- data/test/testcases/block/09_html/html_to_native/entity.text +1 -0
- data/test/testcases/block/09_html/html_to_native/header.html +6 -0
- data/test/testcases/block/09_html/html_to_native/header.options +2 -0
- data/test/testcases/block/09_html/html_to_native/header.text +6 -0
- data/test/testcases/block/09_html/html_to_native/list_dl.html +8 -0
- data/test/testcases/block/09_html/html_to_native/list_dl.text +8 -0
- data/test/testcases/block/09_html/html_to_native/list_ol.html +15 -0
- data/test/testcases/block/09_html/html_to_native/list_ol.text +17 -0
- data/test/testcases/block/09_html/html_to_native/list_ul.html +19 -0
- data/test/testcases/block/09_html/html_to_native/list_ul.text +22 -0
- data/test/testcases/block/09_html/html_to_native/options +1 -0
- data/test/testcases/block/09_html/html_to_native/paragraph.html +3 -0
- data/test/testcases/block/09_html/html_to_native/paragraph.text +4 -0
- data/test/testcases/block/09_html/html_to_native/table_normal.html +12 -0
- data/test/testcases/block/09_html/html_to_native/table_normal.text +12 -0
- data/test/testcases/block/09_html/html_to_native/table_simple.html +48 -0
- data/test/testcases/block/09_html/html_to_native/table_simple.text +56 -0
- data/test/testcases/block/09_html/html_to_native/typography.html +1 -0
- data/test/testcases/block/09_html/html_to_native/typography.html.19 +1 -0
- data/test/testcases/block/09_html/html_to_native/typography.text +1 -0
- data/test/testcases/block/09_html/invalid_html_1.html +5 -0
- data/test/testcases/block/09_html/invalid_html_1.text +5 -0
- data/test/testcases/block/09_html/invalid_html_2.html +5 -0
- data/test/testcases/block/09_html/invalid_html_2.text +5 -0
- data/test/testcases/block/09_html/markdown_attr.html +38 -0
- data/test/testcases/block/09_html/markdown_attr.text +38 -0
- data/test/testcases/block/09_html/not_parsed.html +24 -0
- data/test/testcases/block/09_html/not_parsed.text +24 -0
- data/test/testcases/block/09_html/parse_as_raw.html +35 -0
- data/test/testcases/block/09_html/parse_as_raw.htmlinput +34 -0
- data/test/testcases/block/09_html/parse_as_raw.options +1 -0
- data/test/testcases/block/09_html/parse_as_raw.text +33 -0
- data/test/testcases/block/09_html/parse_as_span.html +12 -0
- data/test/testcases/block/09_html/parse_as_span.htmlinput +12 -0
- data/test/testcases/block/09_html/parse_as_span.options +1 -0
- data/test/testcases/block/09_html/parse_as_span.text +9 -0
- data/test/testcases/block/09_html/parse_block_html.html +21 -0
- data/test/testcases/block/09_html/parse_block_html.options +1 -0
- data/test/testcases/block/09_html/parse_block_html.text +17 -0
- data/test/testcases/block/09_html/processing_instruction.html +13 -0
- data/test/testcases/block/09_html/processing_instruction.text +12 -0
- data/test/testcases/block/09_html/simple.html +64 -0
- data/test/testcases/block/09_html/simple.html.19 +64 -0
- data/test/testcases/block/09_html/simple.options +1 -0
- data/test/testcases/block/09_html/simple.text +59 -0
- data/test/testcases/block/10_ald/simple.html +2 -0
- data/test/testcases/block/10_ald/simple.text +8 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.html +1 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.options +1 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.text +2 -0
- data/test/testcases/block/11_ial/nested.html +11 -0
- data/test/testcases/block/11_ial/nested.text +15 -0
- data/test/testcases/block/11_ial/simple.html +25 -0
- data/test/testcases/block/11_ial/simple.text +34 -0
- data/test/testcases/block/12_extension/comment.html +8 -0
- data/test/testcases/block/12_extension/comment.text +12 -0
- data/test/testcases/block/12_extension/ignored.html +8 -0
- data/test/testcases/block/12_extension/ignored.text +8 -0
- data/test/testcases/block/12_extension/nomarkdown.html +10 -0
- data/test/testcases/block/12_extension/nomarkdown.kramdown +20 -0
- data/test/testcases/block/12_extension/nomarkdown.latex +13 -0
- data/test/testcases/block/12_extension/nomarkdown.text +21 -0
- data/test/testcases/block/12_extension/options.html +21 -0
- data/test/testcases/block/12_extension/options.text +21 -0
- data/test/testcases/block/12_extension/options2.html +10 -0
- data/test/testcases/block/12_extension/options2.text +5 -0
- data/test/testcases/block/12_extension/options3.html +7 -0
- data/test/testcases/block/12_extension/options3.text +7 -0
- data/test/testcases/block/13_definition_list/definition_at_beginning.html +1 -0
- data/test/testcases/block/13_definition_list/definition_at_beginning.text +1 -0
- data/test/testcases/block/13_definition_list/item_ial.html +12 -0
- data/test/testcases/block/13_definition_list/item_ial.text +8 -0
- data/test/testcases/block/13_definition_list/multiple_terms.html +13 -0
- data/test/testcases/block/13_definition_list/multiple_terms.text +10 -0
- data/test/testcases/block/13_definition_list/no_def_list.html +2 -0
- data/test/testcases/block/13_definition_list/no_def_list.text +2 -0
- data/test/testcases/block/13_definition_list/para_wrapping.html +10 -0
- data/test/testcases/block/13_definition_list/para_wrapping.text +6 -0
- data/test/testcases/block/13_definition_list/separated_by_eob.html +8 -0
- data/test/testcases/block/13_definition_list/separated_by_eob.text +5 -0
- data/test/testcases/block/13_definition_list/simple.html +8 -0
- data/test/testcases/block/13_definition_list/simple.text +7 -0
- data/test/testcases/block/13_definition_list/styled_terms.html +4 -0
- data/test/testcases/block/13_definition_list/styled_terms.text +2 -0
- data/test/testcases/block/13_definition_list/too_much_space.html +3 -0
- data/test/testcases/block/13_definition_list/too_much_space.text +4 -0
- data/test/testcases/block/13_definition_list/with_blocks.html +38 -0
- data/test/testcases/block/13_definition_list/with_blocks.text +24 -0
- data/test/testcases/block/14_table/errors.html +8 -0
- data/test/testcases/block/14_table/errors.text +9 -0
- data/test/testcases/block/14_table/escaping.html +52 -0
- data/test/testcases/block/14_table/escaping.text +19 -0
- data/test/testcases/block/14_table/footer.html +65 -0
- data/test/testcases/block/14_table/footer.text +25 -0
- data/test/testcases/block/14_table/header.html +96 -0
- data/test/testcases/block/14_table/header.text +32 -0
- data/test/testcases/block/14_table/no_table.html +3 -0
- data/test/testcases/block/14_table/no_table.text +3 -0
- data/test/testcases/block/14_table/simple.html +177 -0
- data/test/testcases/block/14_table/simple.html.19 +177 -0
- data/test/testcases/block/14_table/simple.text +49 -0
- data/test/testcases/block/14_table/table_with_footnote.html +25 -0
- data/test/testcases/block/14_table/table_with_footnote.latex +11 -0
- data/test/testcases/block/14_table/table_with_footnote.text +6 -0
- data/test/testcases/block/15_math/normal.html +26 -0
- data/test/testcases/block/15_math/normal.text +28 -0
- data/test/testcases/block/16_toc/no_toc.html +33 -0
- data/test/testcases/block/16_toc/no_toc.options +1 -0
- data/test/testcases/block/16_toc/no_toc.text +16 -0
- data/test/testcases/block/16_toc/toc_levels.html +24 -0
- data/test/testcases/block/16_toc/toc_levels.options +1 -0
- data/test/testcases/block/16_toc/toc_levels.text +16 -0
- data/test/testcases/block/17_github_codeblock/backtick_syntax.html +7 -0
- data/test/testcases/block/17_github_codeblock/backtick_syntax.text +9 -0
- data/test/testcases/block/17_github_codeblock/error.html +4 -0
- data/test/testcases/block/17_github_codeblock/error.text +4 -0
- data/test/testcases/block/17_github_codeblock/no_newline_at_end.html +2 -0
- data/test/testcases/block/17_github_codeblock/no_newline_at_end.text +3 -0
- data/test/testcases/encoding.html +46 -0
- data/test/testcases/encoding.text +28 -0
- data/test/testcases/span/01_link/empty.html +5 -0
- data/test/testcases/span/01_link/empty.text +5 -0
- data/test/testcases/span/01_link/image_in_a.html +5 -0
- data/test/testcases/span/01_link/image_in_a.text +5 -0
- data/test/testcases/span/01_link/imagelinks.html +14 -0
- data/test/testcases/span/01_link/imagelinks.text +16 -0
- data/test/testcases/span/01_link/inline.html +46 -0
- data/test/testcases/span/01_link/inline.html.19 +46 -0
- data/test/testcases/span/01_link/inline.text +48 -0
- data/test/testcases/span/01_link/link_defs.html +9 -0
- data/test/testcases/span/01_link/link_defs.text +26 -0
- data/test/testcases/span/01_link/links_with_angle_brackets.html +3 -0
- data/test/testcases/span/01_link/links_with_angle_brackets.text +3 -0
- data/test/testcases/span/01_link/reference.html +36 -0
- data/test/testcases/span/01_link/reference.html.19 +36 -0
- data/test/testcases/span/01_link/reference.text +50 -0
- data/test/testcases/span/02_emphasis/empty.html +3 -0
- data/test/testcases/span/02_emphasis/empty.text +3 -0
- data/test/testcases/span/02_emphasis/errors.html +9 -0
- data/test/testcases/span/02_emphasis/errors.text +9 -0
- data/test/testcases/span/02_emphasis/nesting.html +38 -0
- data/test/testcases/span/02_emphasis/nesting.text +33 -0
- data/test/testcases/span/02_emphasis/normal.html +46 -0
- data/test/testcases/span/02_emphasis/normal.text +46 -0
- data/test/testcases/span/03_codespan/empty.html +5 -0
- data/test/testcases/span/03_codespan/empty.text +5 -0
- data/test/testcases/span/03_codespan/errors.html +1 -0
- data/test/testcases/span/03_codespan/errors.text +1 -0
- data/test/testcases/span/03_codespan/highlighting.html +1 -0
- data/test/testcases/span/03_codespan/highlighting.text +1 -0
- data/test/testcases/span/03_codespan/normal.html +16 -0
- data/test/testcases/span/03_codespan/normal.text +16 -0
- data/test/testcases/span/04_footnote/definitions.html +17 -0
- data/test/testcases/span/04_footnote/definitions.latex +17 -0
- data/test/testcases/span/04_footnote/definitions.text +24 -0
- data/test/testcases/span/04_footnote/footnote_nr.html +12 -0
- data/test/testcases/span/04_footnote/footnote_nr.latex +2 -0
- data/test/testcases/span/04_footnote/footnote_nr.options +1 -0
- data/test/testcases/span/04_footnote/footnote_nr.text +4 -0
- data/test/testcases/span/04_footnote/markers.html +46 -0
- data/test/testcases/span/04_footnote/markers.latex +23 -0
- data/test/testcases/span/04_footnote/markers.text +26 -0
- data/test/testcases/span/05_html/across_lines.html +1 -0
- data/test/testcases/span/05_html/across_lines.text +2 -0
- data/test/testcases/span/05_html/invalid.html +1 -0
- data/test/testcases/span/05_html/invalid.text +1 -0
- data/test/testcases/span/05_html/link_with_mailto.html +1 -0
- data/test/testcases/span/05_html/link_with_mailto.text +1 -0
- data/test/testcases/span/05_html/markdown_attr.html +6 -0
- data/test/testcases/span/05_html/markdown_attr.text +6 -0
- data/test/testcases/span/05_html/normal.html +34 -0
- data/test/testcases/span/05_html/normal.text +34 -0
- data/test/testcases/span/abbreviations/abbrev.html +8 -0
- data/test/testcases/span/abbreviations/abbrev.text +15 -0
- data/test/testcases/span/abbreviations/abbrev_defs.html +2 -0
- data/test/testcases/span/abbreviations/abbrev_defs.text +5 -0
- data/test/testcases/span/autolinks/url_links.html +12 -0
- data/test/testcases/span/autolinks/url_links.text +12 -0
- data/test/testcases/span/escaped_chars/normal.html +47 -0
- data/test/testcases/span/escaped_chars/normal.text +47 -0
- data/test/testcases/span/extension/comment.html +6 -0
- data/test/testcases/span/extension/comment.text +6 -0
- data/test/testcases/span/extension/ignored.html +1 -0
- data/test/testcases/span/extension/ignored.text +1 -0
- data/test/testcases/span/extension/nomarkdown.html +1 -0
- data/test/testcases/span/extension/nomarkdown.text +1 -0
- data/test/testcases/span/extension/options.html +1 -0
- data/test/testcases/span/extension/options.text +1 -0
- data/test/testcases/span/ial/simple.html +6 -0
- data/test/testcases/span/ial/simple.text +6 -0
- data/test/testcases/span/line_breaks/normal.html +11 -0
- data/test/testcases/span/line_breaks/normal.latex +12 -0
- data/test/testcases/span/line_breaks/normal.text +11 -0
- data/test/testcases/span/math/normal.html +5 -0
- data/test/testcases/span/math/normal.text +5 -0
- data/test/testcases/span/text_substitutions/entities.html +6 -0
- data/test/testcases/span/text_substitutions/entities.options +1 -0
- data/test/testcases/span/text_substitutions/entities.text +6 -0
- data/test/testcases/span/text_substitutions/entities_as_char.html +1 -0
- data/test/testcases/span/text_substitutions/entities_as_char.html.19 +1 -0
- data/test/testcases/span/text_substitutions/entities_as_char.options +1 -0
- data/test/testcases/span/text_substitutions/entities_as_char.text +1 -0
- data/test/testcases/span/text_substitutions/entities_as_input.html +1 -0
- data/test/testcases/span/text_substitutions/entities_as_input.options +1 -0
- data/test/testcases/span/text_substitutions/entities_as_input.text +1 -0
- data/test/testcases/span/text_substitutions/entities_numeric.html +1 -0
- data/test/testcases/span/text_substitutions/entities_numeric.options +1 -0
- data/test/testcases/span/text_substitutions/entities_numeric.text +1 -0
- data/test/testcases/span/text_substitutions/entities_symbolic.html +1 -0
- data/test/testcases/span/text_substitutions/entities_symbolic.options +1 -0
- data/test/testcases/span/text_substitutions/entities_symbolic.text +1 -0
- data/test/testcases/span/text_substitutions/greaterthan.html +1 -0
- data/test/testcases/span/text_substitutions/greaterthan.text +1 -0
- data/test/testcases/span/text_substitutions/lowerthan.html +1 -0
- data/test/testcases/span/text_substitutions/lowerthan.text +1 -0
- data/test/testcases/span/text_substitutions/typography.html +18 -0
- data/test/testcases/span/text_substitutions/typography.html.19 +18 -0
- data/test/testcases/span/text_substitutions/typography.text +18 -0
- metadata +817 -0
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
source ~/.bashrc
|
4
|
+
|
5
|
+
RUBY_VERSIONS=`rvm list strings | sort`
|
6
|
+
KD_VERSIONS="`git tag | sort -V` master"
|
7
|
+
OTHERS=false
|
8
|
+
AVERAGE=1
|
9
|
+
MASTER_AS=master
|
10
|
+
|
11
|
+
while getopts "r:k:o:m:a:" optname; do
|
12
|
+
case "$optname" in
|
13
|
+
"r")
|
14
|
+
RUBY_VERSIONS="$OPTARG"
|
15
|
+
;;
|
16
|
+
"k")
|
17
|
+
KD_VERSIONS="$OPTARG"
|
18
|
+
;;
|
19
|
+
"o")
|
20
|
+
OTHERS=true
|
21
|
+
;;
|
22
|
+
"m")
|
23
|
+
MASTER_AS="$OPTARG"
|
24
|
+
;;
|
25
|
+
"a")
|
26
|
+
AVERAGE="$OPTARG"
|
27
|
+
;;
|
28
|
+
"?")
|
29
|
+
echo "Unknown option $OPTARG"
|
30
|
+
exit 1
|
31
|
+
;;
|
32
|
+
":")
|
33
|
+
echo "No argument value for option $OPTARG"
|
34
|
+
exit 1
|
35
|
+
;;
|
36
|
+
*)
|
37
|
+
echo "Unknown error while processing options"
|
38
|
+
exit 1
|
39
|
+
;;
|
40
|
+
esac
|
41
|
+
done
|
42
|
+
|
43
|
+
TMPDIR=/tmp/kramdown-benchmark
|
44
|
+
|
45
|
+
rm -rf $TMPDIR
|
46
|
+
mkdir -p $TMPDIR
|
47
|
+
cp benchmark/md* $TMPDIR
|
48
|
+
cp benchmark/generate_data.rb $TMPDIR
|
49
|
+
git clone .git ${TMPDIR}/kramdown
|
50
|
+
cd ${TMPDIR}/kramdown
|
51
|
+
|
52
|
+
for RUBY_VERSION in $RUBY_VERSIONS; do
|
53
|
+
rvm $RUBY_VERSION
|
54
|
+
echo "Creating benchmark data for $(ruby -v)"
|
55
|
+
|
56
|
+
for KD_VERSION in $KD_VERSIONS; do
|
57
|
+
echo "Using kramdown version $KD_VERSION"
|
58
|
+
git co $KD_VERSION 2>/dev/null
|
59
|
+
if [ -z $MASTER_AS -o $KD_VERSION != master ]; then
|
60
|
+
VNUM=${KD_VERSION}
|
61
|
+
else
|
62
|
+
VNUM=$MASTER_AS
|
63
|
+
fi
|
64
|
+
ruby -I${TMPDIR}/kramdown/lib ../generate_data.rb -k ${VNUM} -a ${AVERAGE} >/dev/null
|
65
|
+
done
|
66
|
+
|
67
|
+
if [ $OTHERS = "true" ]; then
|
68
|
+
ruby -rubygems -I${TMPDIR}/kramdown/lib ../generate_data.rb -o >/dev/null
|
69
|
+
fi
|
70
|
+
done
|
71
|
+
|
72
|
+
cd ${TMPDIR}
|
73
|
+
rvm default
|
74
|
+
ruby generate_data.rb -g
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'benchmark'
|
2
|
+
require 'optparse'
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
require 'kramdown'
|
6
|
+
|
7
|
+
options = {:others => false, :average => 1}
|
8
|
+
OptionParser.new do |opts|
|
9
|
+
opts.on("-a AVG", "--average AVG", Integer, "Average times over the specified number of runs") {|v| options[:average] = v }
|
10
|
+
opts.on("-o", "--[no-]others", "Generate data for other parsers") {|v| options[:others] = v}
|
11
|
+
opts.on("-g", "--[no-]graph", "Generate graph") {|v| options[:graph] = v}
|
12
|
+
opts.on("-k VERSION", "--kramdown VERSION", String, "Add benchmark data for kramdown version VERSION") {|v| options[:kramdown] = v}
|
13
|
+
end.parse!
|
14
|
+
|
15
|
+
THISRUBY = (self.class.const_defined?(:RUBY_DESCRIPTION) ? RUBY_DESCRIPTION.scan(/^.*?(?=\s*\()/).first.sub(/\s/, '-') : "ruby-#{RUBY_VERSION}") + '-' + RUBY_PATCHLEVEL.to_s
|
16
|
+
|
17
|
+
Dir.chdir(File.dirname(__FILE__))
|
18
|
+
BMDATA = File.read('mdbasics.text')
|
19
|
+
MULTIPLIER = (0..5).map {|i| 2**i}
|
20
|
+
|
21
|
+
if options[:others]
|
22
|
+
require 'maruku'
|
23
|
+
require 'maruku/version'
|
24
|
+
begin
|
25
|
+
require 'rdiscount'
|
26
|
+
rescue LoadError
|
27
|
+
end
|
28
|
+
#require 'bluefeather'
|
29
|
+
|
30
|
+
module MaRuKu::Errors
|
31
|
+
def tell_user(s)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
bmdata = {}
|
36
|
+
labels = []
|
37
|
+
MULTIPLIER.each do |i|
|
38
|
+
$stderr.puts "Generating benchmark data for other parsers, multiplier #{i}"
|
39
|
+
mddata = BMDATA*i
|
40
|
+
labels = []
|
41
|
+
bmdata[i] = Benchmark::bmbm do |x|
|
42
|
+
labels << "Maruku #{MaRuKu::Version}"
|
43
|
+
x.report { Maruku.new(mddata, :on_error => :ignore).to_html }
|
44
|
+
if self.class.const_defined?(:BlueFeather)
|
45
|
+
labels << "BlueFeather #{BlueFeather::VERSION}"
|
46
|
+
x.report { BlueFeather.parse(mddata) }
|
47
|
+
end
|
48
|
+
if self.class.const_defined?(:RDiscount)
|
49
|
+
labels << "RDiscount #{RDiscount::VERSION}"
|
50
|
+
x.report { RDiscount.new(mddata).to_html }
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
File.open("static-#{THISRUBY}.dat", 'w+') do |f|
|
55
|
+
f.puts "# " + labels.join(" || ")
|
56
|
+
format_str = "%5d" + " %10.5f"*bmdata[MULTIPLIER.first].size
|
57
|
+
bmdata.sort.each do |m,v|
|
58
|
+
f.puts format_str % [m, *v.map {|tms| tms.real}]
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
if options[:kramdown]
|
64
|
+
kramdown = "kramdown-#{THISRUBY}.dat"
|
65
|
+
data = if File.exist?(kramdown)
|
66
|
+
lines = File.readlines(kramdown).map {|l| l.chomp}
|
67
|
+
lines.first << " || "
|
68
|
+
lines
|
69
|
+
else
|
70
|
+
["# ", *MULTIPLIER.map {|m| "%3d" % m}]
|
71
|
+
end
|
72
|
+
data.first << "#{options[:kramdown]}".rjust(10)
|
73
|
+
|
74
|
+
times = []
|
75
|
+
options[:average].times do
|
76
|
+
MULTIPLIER.each_with_index do |m, i|
|
77
|
+
$stderr.puts "Generating benchmark data for kramdown version #{options[:kramdown]}, multiplier #{m}"
|
78
|
+
mddata = BMDATA*m
|
79
|
+
begin
|
80
|
+
(times[i] ||= []) << Benchmark::bmbm {|x| x.report { Kramdown::Document.new(mddata).to_html } }.first.real
|
81
|
+
rescue
|
82
|
+
$stderr.puts $!.message
|
83
|
+
(times[i] ||= []) << 0
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
times.each_with_index {|t,i| data[i+1] << "%14.5f" % (t.inject(0) {|sum,v| sum+v}/3.0)}
|
88
|
+
File.open(kramdown, 'w+') do |f|
|
89
|
+
data.each {|l| f.puts l}
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
if options[:graph]
|
94
|
+
Dir['kramdown-*.dat'].each do |kramdown_name|
|
95
|
+
theruby = kramdown_name.sub(/^kramdown-/, '').sub(/\.dat$/, '')
|
96
|
+
graph_name = "graph-#{theruby}.png"
|
97
|
+
static_name = "static-#{theruby}.dat"
|
98
|
+
kramdown_names = File.readlines(kramdown_name).first.chomp[1..-1].split(/\s*\|\|\s*/)
|
99
|
+
static_names = (File.exist?(static_name) ? File.readlines(static_name).first.chomp[1..-1].split(/\s*\|\|\s*/) : [])
|
100
|
+
File.open("gnuplot.dat", "w+") do |f|
|
101
|
+
f.puts <<EOF
|
102
|
+
set title "Execution Time Performance for #{theruby}"
|
103
|
+
set xlabel "File Multiplier (i.e. n times mdbasic.text)"
|
104
|
+
set ylabel "Execution Time in secondes"
|
105
|
+
set key left top
|
106
|
+
set grid "on"
|
107
|
+
set terminal png
|
108
|
+
set output "#{graph_name}"
|
109
|
+
EOF
|
110
|
+
f.print "plot "
|
111
|
+
i, j = 1, 1
|
112
|
+
f.puts((kramdown_names.map {|n| i += 1; "\"#{kramdown_name}\" using 1:#{i} with lp title \"#{n}\""} +
|
113
|
+
static_names.map {|n| j += 1; n =~ /bluefeather/i ? nil : "\"#{static_name}\" using 1:#{j} with lp title \"#{n}\""}.compact
|
114
|
+
).join(", "))
|
115
|
+
end
|
116
|
+
`gnuplot gnuplot.dat`
|
117
|
+
FileUtils.rm("gnuplot.dat")
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,306 @@
|
|
1
|
+
Markdown: Basics
|
2
|
+
================
|
3
|
+
|
4
|
+
<ul id="ProjectSubmenu">
|
5
|
+
<li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li>
|
6
|
+
<li><a class="selected" title="Markdown Basics">Basics</a></li>
|
7
|
+
<li><a href="/projects/markdown/syntax" title="Markdown Syntax Documentation">Syntax</a></li>
|
8
|
+
<li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li>
|
9
|
+
<li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
|
10
|
+
</ul>
|
11
|
+
|
12
|
+
|
13
|
+
Getting the Gist of Markdown's Formatting Syntax
|
14
|
+
------------------------------------------------
|
15
|
+
|
16
|
+
This page offers a brief overview of what it's like to use Markdown.
|
17
|
+
The [syntax page] [s] provides complete, detailed documentation for
|
18
|
+
every feature, but Markdown should be very easy to pick up simply by
|
19
|
+
looking at a few examples of it in action. The examples on this page
|
20
|
+
are written in a before/after style, showing example syntax and the
|
21
|
+
HTML output produced by Markdown.
|
22
|
+
|
23
|
+
It's also helpful to simply try Markdown out; the [Dingus] [d] is a
|
24
|
+
web application that allows you type your own Markdown-formatted text
|
25
|
+
and translate it to XHTML.
|
26
|
+
|
27
|
+
**Note:** This document is itself written using Markdown; you
|
28
|
+
can [see the source for it by adding '.text' to the URL] [src].
|
29
|
+
|
30
|
+
[s]: /projects/markdown/syntax "Markdown Syntax"
|
31
|
+
[d]: /projects/markdown/dingus "Markdown Dingus"
|
32
|
+
[src]: /projects/markdown/basics.text
|
33
|
+
|
34
|
+
|
35
|
+
## Paragraphs, Headers, Blockquotes ##
|
36
|
+
|
37
|
+
A paragraph is simply one or more consecutive lines of text, separated
|
38
|
+
by one or more blank lines. (A blank line is any line that looks like a
|
39
|
+
blank line -- a line containing nothing spaces or tabs is considered
|
40
|
+
blank.) Normal paragraphs should not be intended with spaces or tabs.
|
41
|
+
|
42
|
+
Markdown offers two styles of headers: *Setext* and *atx*.
|
43
|
+
Setext-style headers for `<h1>` and `<h2>` are created by
|
44
|
+
"underlining" with equal signs (`=`) and hyphens (`-`), respectively.
|
45
|
+
To create an atx-style header, you put 1-6 hash marks (`#`) at the
|
46
|
+
beginning of the line -- the number of hashes equals the resulting
|
47
|
+
HTML header level.
|
48
|
+
|
49
|
+
Blockquotes are indicated using email-style '`>`' angle brackets.
|
50
|
+
|
51
|
+
Markdown:
|
52
|
+
|
53
|
+
A First Level Header
|
54
|
+
====================
|
55
|
+
|
56
|
+
A Second Level Header
|
57
|
+
---------------------
|
58
|
+
|
59
|
+
Now is the time for all good men to come to
|
60
|
+
the aid of their country. This is just a
|
61
|
+
regular paragraph.
|
62
|
+
|
63
|
+
The quick brown fox jumped over the lazy
|
64
|
+
dog's back.
|
65
|
+
|
66
|
+
### Header 3
|
67
|
+
|
68
|
+
> This is a blockquote.
|
69
|
+
>
|
70
|
+
> This is the second paragraph in the blockquote.
|
71
|
+
>
|
72
|
+
> ## This is an H2 in a blockquote
|
73
|
+
|
74
|
+
|
75
|
+
Output:
|
76
|
+
|
77
|
+
<h1>A First Level Header</h1>
|
78
|
+
|
79
|
+
<h2>A Second Level Header</h2>
|
80
|
+
|
81
|
+
<p>Now is the time for all good men to come to
|
82
|
+
the aid of their country. This is just a
|
83
|
+
regular paragraph.</p>
|
84
|
+
|
85
|
+
<p>The quick brown fox jumped over the lazy
|
86
|
+
dog's back.</p>
|
87
|
+
|
88
|
+
<h3>Header 3</h3>
|
89
|
+
|
90
|
+
<blockquote>
|
91
|
+
<p>This is a blockquote.</p>
|
92
|
+
|
93
|
+
<p>This is the second paragraph in the blockquote.</p>
|
94
|
+
|
95
|
+
<h2>This is an H2 in a blockquote</h2>
|
96
|
+
</blockquote>
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
### Phrase Emphasis ###
|
101
|
+
|
102
|
+
Markdown uses asterisks and underscores to indicate spans of emphasis.
|
103
|
+
|
104
|
+
Markdown:
|
105
|
+
|
106
|
+
Some of these words *are emphasized*.
|
107
|
+
Some of these words _are emphasized also_.
|
108
|
+
|
109
|
+
Use two asterisks for **strong emphasis**.
|
110
|
+
Or, if you prefer, __use two underscores instead__.
|
111
|
+
|
112
|
+
Output:
|
113
|
+
|
114
|
+
<p>Some of these words <em>are emphasized</em>.
|
115
|
+
Some of these words <em>are emphasized also</em>.</p>
|
116
|
+
|
117
|
+
<p>Use two asterisks for <strong>strong emphasis</strong>.
|
118
|
+
Or, if you prefer, <strong>use two underscores instead</strong>.</p>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
## Lists ##
|
123
|
+
|
124
|
+
Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,
|
125
|
+
`+`, and `-`) as list markers. These three markers are
|
126
|
+
interchangable; this:
|
127
|
+
|
128
|
+
* Candy.
|
129
|
+
* Gum.
|
130
|
+
* Booze.
|
131
|
+
|
132
|
+
this:
|
133
|
+
|
134
|
+
+ Candy.
|
135
|
+
+ Gum.
|
136
|
+
+ Booze.
|
137
|
+
|
138
|
+
and this:
|
139
|
+
|
140
|
+
- Candy.
|
141
|
+
- Gum.
|
142
|
+
- Booze.
|
143
|
+
|
144
|
+
all produce the same output:
|
145
|
+
|
146
|
+
<ul>
|
147
|
+
<li>Candy.</li>
|
148
|
+
<li>Gum.</li>
|
149
|
+
<li>Booze.</li>
|
150
|
+
</ul>
|
151
|
+
|
152
|
+
Ordered (numbered) lists use regular numbers, followed by periods, as
|
153
|
+
list markers:
|
154
|
+
|
155
|
+
1. Red
|
156
|
+
2. Green
|
157
|
+
3. Blue
|
158
|
+
|
159
|
+
Output:
|
160
|
+
|
161
|
+
<ol>
|
162
|
+
<li>Red</li>
|
163
|
+
<li>Green</li>
|
164
|
+
<li>Blue</li>
|
165
|
+
</ol>
|
166
|
+
|
167
|
+
If you put blank lines between items, you'll get `<p>` tags for the
|
168
|
+
list item text. You can create multi-paragraph list items by indenting
|
169
|
+
the paragraphs by 4 spaces or 1 tab:
|
170
|
+
|
171
|
+
* A list item.
|
172
|
+
|
173
|
+
With multiple paragraphs.
|
174
|
+
|
175
|
+
* Another item in the list.
|
176
|
+
|
177
|
+
Output:
|
178
|
+
|
179
|
+
<ul>
|
180
|
+
<li><p>A list item.</p>
|
181
|
+
<p>With multiple paragraphs.</p></li>
|
182
|
+
<li><p>Another item in the list.</p></li>
|
183
|
+
</ul>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
### Links ###
|
188
|
+
|
189
|
+
Markdown supports two styles for creating links: *inline* and
|
190
|
+
*reference*. With both styles, you use square brackets to delimit the
|
191
|
+
text you want to turn into a link.
|
192
|
+
|
193
|
+
Inline-style links use parentheses immediately after the link text.
|
194
|
+
For example:
|
195
|
+
|
196
|
+
This is an [example link](http://example.com/).
|
197
|
+
|
198
|
+
Output:
|
199
|
+
|
200
|
+
<p>This is an <a href="http://example.com/">
|
201
|
+
example link</a>.</p>
|
202
|
+
|
203
|
+
Optionally, you may include a title attribute in the parentheses:
|
204
|
+
|
205
|
+
This is an [example link](http://example.com/ "With a Title").
|
206
|
+
|
207
|
+
Output:
|
208
|
+
|
209
|
+
<p>This is an <a href="http://example.com/" title="With a Title">
|
210
|
+
example link</a>.</p>
|
211
|
+
|
212
|
+
Reference-style links allow you to refer to your links by names, which
|
213
|
+
you define elsewhere in your document:
|
214
|
+
|
215
|
+
I get 10 times more traffic from [Google][1] than from
|
216
|
+
[Yahoo][2] or [MSN][3].
|
217
|
+
|
218
|
+
[1]: http://google.com/ "Google"
|
219
|
+
[2]: http://search.yahoo.com/ "Yahoo Search"
|
220
|
+
[3]: http://search.msn.com/ "MSN Search"
|
221
|
+
|
222
|
+
Output:
|
223
|
+
|
224
|
+
<p>I get 10 times more traffic from <a href="http://google.com/"
|
225
|
+
title="Google">Google</a> than from <a href="http://search.yahoo.com/"
|
226
|
+
title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
|
227
|
+
title="MSN Search">MSN</a>.</p>
|
228
|
+
|
229
|
+
The title attribute is optional. Link names may contain letters,
|
230
|
+
numbers and spaces, but are *not* case sensitive:
|
231
|
+
|
232
|
+
I start my morning with a cup of coffee and
|
233
|
+
[The New York Times][NY Times].
|
234
|
+
|
235
|
+
[ny times]: http://www.nytimes.com/
|
236
|
+
|
237
|
+
Output:
|
238
|
+
|
239
|
+
<p>I start my morning with a cup of coffee and
|
240
|
+
<a href="http://www.nytimes.com/">The New York Times</a>.</p>
|
241
|
+
|
242
|
+
|
243
|
+
### Images ###
|
244
|
+
|
245
|
+
Image syntax is very much like link syntax.
|
246
|
+
|
247
|
+
Inline (titles are optional):
|
248
|
+
|
249
|
+
![alt text](/path/to/img.jpg "Title")
|
250
|
+
|
251
|
+
Reference-style:
|
252
|
+
|
253
|
+
![alt text][id]
|
254
|
+
|
255
|
+
[id]: /path/to/img.jpg "Title"
|
256
|
+
|
257
|
+
Both of the above examples produce the same output:
|
258
|
+
|
259
|
+
<img src="/path/to/img.jpg" alt="alt text" title="Title" />
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
### Code ###
|
264
|
+
|
265
|
+
In a regular paragraph, you can create code span by wrapping text in
|
266
|
+
backtick quotes. Any ampersands (`&`) and angle brackets (`<` or
|
267
|
+
`>`) will automatically be translated into HTML entities. This makes
|
268
|
+
it easy to use Markdown to write about HTML example code:
|
269
|
+
|
270
|
+
I strongly recommend against using any `<blink>` tags.
|
271
|
+
|
272
|
+
I wish SmartyPants used named entities like `—`
|
273
|
+
instead of decimal-encoded entites like `—`.
|
274
|
+
|
275
|
+
Output:
|
276
|
+
|
277
|
+
<p>I strongly recommend against using any
|
278
|
+
<code><blink></code> tags.</p>
|
279
|
+
|
280
|
+
<p>I wish SmartyPants used named entities like
|
281
|
+
<code>&mdash;</code> instead of decimal-encoded
|
282
|
+
entites like <code>&#8212;</code>.</p>
|
283
|
+
|
284
|
+
|
285
|
+
To specify an entire block of pre-formatted code, indent every line of
|
286
|
+
the block by 4 spaces or 1 tab. Just like with code spans, `&`, `<`,
|
287
|
+
and `>` characters will be escaped automatically.
|
288
|
+
|
289
|
+
Markdown:
|
290
|
+
|
291
|
+
If you want your page to validate under XHTML 1.0 Strict,
|
292
|
+
you've got to put paragraph tags in your blockquotes:
|
293
|
+
|
294
|
+
<blockquote>
|
295
|
+
<p>For example.</p>
|
296
|
+
</blockquote>
|
297
|
+
|
298
|
+
Output:
|
299
|
+
|
300
|
+
<p>If you want your page to validate under XHTML 1.0 Strict,
|
301
|
+
you've got to put paragraph tags in your blockquotes:</p>
|
302
|
+
|
303
|
+
<pre><code><blockquote>
|
304
|
+
<p>For example.</p>
|
305
|
+
</blockquote>
|
306
|
+
</code></pre>
|