### Blockquote Example Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/08_list/other_first_element.html Illustrates a simple blockquote in Kramdown. ```markdown * > This is a blockquote. ``` -------------------------------- ### Header Example (Underline) Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/08_list/other_first_element.html Shows how to create a header using underline syntax in Kramdown. ```markdown * A header -------- ``` -------------------------------- ### HTML Span Parsing Example Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/09_html/parse_as_span.html Demonstrates how Kramdown parses HTML within text, showing an example that results in an unwanted output when treated as a span. ```html

This _text should_ be parsed as span

` ` an unwanted result.

``` -------------------------------- ### Header Example (Setext Style) Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/08_list/other_first_element.html Demonstrates creating a header using setext-style underline in Kramdown. ```markdown * A header ======== a para ``` -------------------------------- ### Code Block Example Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/08_list/other_first_element.html Demonstrates a basic code block in Kramdown. ```markdown * This is a code block. ``` -------------------------------- ### Standard Blockquote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/05_blockquote/indented.html A basic blockquote example. Use the '>' prefix for each line. ```markdown > A normal blockquote. ``` -------------------------------- ### Nested List Example Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/08_list/other_first_element.html Illustrates nested list structures in Kramdown. ```markdown * * nested list * other nested item * item 2 ``` -------------------------------- ### Basic Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/06_codeblock/with_blank_line.html A simple code block example. ```text code block continued here ``` -------------------------------- ### Simple Markdown Table Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/14_table/simple.html A basic example of a Markdown table with two columns and two rows of data. ```Markdown head1 | head2 cell1 | cell2 ``` -------------------------------- ### Starting Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/06_codeblock/normal.html Represents the initial code segment. ```plaintext starting code ``` -------------------------------- ### Handling Code with Special Characters Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/09_html/html_to_native/code.html This example shows how code containing special characters like '<<' is processed. ```text Some code<< ``` -------------------------------- ### Preserving Angle Brackets in Text Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/09_html/html_to_native/code.html This example shows how literal angle brackets within text are handled. ```text Some < ``` -------------------------------- ### Basic kramdown to HTML Conversion Source: https://github.com/gettalong/kramdown/blob/master/README.md Use this snippet for basic conversion of Markdown text to HTML using the kramdown library. Ensure the kramdown gem is installed. ```ruby require 'kramdown' Kramdown::Document.new(text).to_html ``` -------------------------------- ### Mixed Indentation Example Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/03_paragraph/indented.html Markdown parsers may handle mixed indentation inconsistently. Consistent indentation is recommended for code blocks. ```markdown A para with mixed indents. and with much indent ``` -------------------------------- ### Table with Inline Code Span and Pipe Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/14_table/simple.html Demonstrates a table cell with an inline code span containing a pipe character, similar to other examples but within a different context. ```Markdown a `span | with` a pipe. ``` -------------------------------- ### Unreferenced Footnote Marker Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html An example of a footnote marker that lacks a corresponding definition. Kramdown may handle this as an unreferenced marker. ```markdown A marker without a definition [^without]. ``` -------------------------------- ### Code with Samples Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/06_codeblock/normal.html Illustrates code that includes sample usage or data. ```plaintext other code with samples ``` -------------------------------- ### Definition List with Custom Class Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/13_definition_list/item_ial.html Demonstrates applying a custom CSS class to a definition list item. ```markdown another {:.cls} ``` -------------------------------- ### Kramdown Header Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/13_definition_list/with_blocks.html Shows how to create a header in Kramdown. ```markdown header ====== ``` -------------------------------- ### Code Block with Blank Line and Indentation Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/06_codeblock/with_blank_line.html Demonstrates a code block with a blank line and leading spaces. ```text next blank line has 4 spaces ``` -------------------------------- ### Handling Simple Code Spans Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/09_html/html_to_native/code.html This snippet demonstrates the handling of a basic code span. ```html This is a `simple code` span. ``` -------------------------------- ### HTML List with Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/11_ial/simple.html Demonstrates an HTML list item containing a code block. ```html * list code block other code block ``` -------------------------------- ### Basic Definition List Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/13_definition_list/item_ial.html A simple definition list with a term and its definition. ```markdown item definition continued another {:.cls} ``` -------------------------------- ### Table with Key-Value Pair and Types Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/14_table/simple.html Shows a table representing key-value pairs with specified types, using backticks for type names and quotes for string values. ```Markdown Key | Value type `Type` | `"GROUP"`|`"UNKNOWN"` ``` -------------------------------- ### Kramdown List Items Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/13_definition_list/with_blocks.html Illustrates list items in Kramdown. ```markdown * list * items ``` -------------------------------- ### Footnote Definition with Back-references Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html Illustrates a footnote definition with multiple back-reference links. Each back-reference points to a specific footnote reference. ```markdown 1. Some foot note text [↩](#fnref:fn) [↩2](#fnref:fn:1) [↩3](#fnref:fn:2) ``` -------------------------------- ### Table with Simple Code Spans Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/14_table/simple.html Illustrates a basic table structure containing simple code spans. ```Markdown a `b` `a` ``` -------------------------------- ### Definition List with Multiple Terms Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/13_definition_list/item_ial.html Shows a definition list with multiple terms sharing the same definition. ```markdown term1 term2 definition ``` -------------------------------- ### Ruby Class Definition Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/06_codeblock/guess_lang_css_class.html A basic Ruby class definition with a method. ```ruby class Foo def bar puts 'Hello' end end ``` -------------------------------- ### Footnote Definition with Text and Back-reference Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html A simple footnote definition with text and a single back-reference link. ```markdown 3. some _text_ [↩](#fnref:1) ``` -------------------------------- ### Blockquote with Continuation Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/08_list/other_first_element.html Shows a blockquote followed by a paragraph in Kramdown. ```markdown * > This is a blockquote. continued by some para. ``` -------------------------------- ### Math Block Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Illustrates a footnote reference associated with a math block. The reference appears after the math content. ```markdown \\[x + 2\\] [↩](#fnref:mathblock) ``` -------------------------------- ### HTML Block Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Demonstrates a footnote reference following an HTML block. The reference links to a footnote defined for the HTML content. ```markdown test [↩](#fnref:html) ``` -------------------------------- ### Table with Escaped Pipe Characters Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/14_table/simple.html Illustrates how to correctly escape pipe characters within table cells to prevent them from being interpreted as column separators. ```Markdown cell1 | cell1 cell2 cell1 cell2 | cell1 `|` con cell2 ``` -------------------------------- ### Ruby Blockquote with Return Statement Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/05_blockquote/with_code_blocks.html A Ruby subroutine within a blockquote that returns a status string. ```ruby sub status { return "working"; } ``` -------------------------------- ### Ruby Blockquote with Print Statement Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/05_blockquote/with_code_blocks.html A simple Ruby subroutine within a blockquote that prints a status message. ```ruby sub status { print "working"; } ``` -------------------------------- ### Blockquote Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Demonstrates a footnote reference within a blockquote. The footnote content is nested. ```markdown > blockquote > > paragraph [↩](#fnref:blockquote) ``` -------------------------------- ### Footnote Reference After Header Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html A footnote reference placed immediately after a header. This syntax is supported. ```markdown And a header[4](#fn:now) ======================== ``` -------------------------------- ### List Item Footnote with Nested Blockquote and Header Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Illustrates a footnote reference within a nested list item, which itself contains a blockquote and a header. ```markdown * item 1 * item 2 * sub item > blockquote > > header [↩](#fnref:list) > ======================= ``` -------------------------------- ### Paragraph Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Illustrates a footnote reference within a standard paragraph. Ensure the footnote definition exists elsewhere. ```markdown This is [1](#fn:paragraph) ``` -------------------------------- ### Header Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Shows a footnote reference attached to a header. The footnote definition should be separate. ```markdown A header [↩](#fnref:header) =========================== ``` -------------------------------- ### Blockquote with Mixed Indents Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/05_blockquote/indented.html Illustrates a blockquote with inconsistent indentation. Markdown parsers may handle this differently. ```markdown > Blockquote with mixed indents. ``` -------------------------------- ### Footnote Definition with Empty Reference Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html A footnote definition linked to an empty reference. This shows how Kramdown handles definitions without explicit content. ```markdown 5. [↩](#fnref:empty) ``` -------------------------------- ### Codeblock Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Shows a footnote reference associated with a code block. The reference appears after the code. ```markdown codeblock [↩](#fnref:codeblock) ``` -------------------------------- ### Blockquote within a Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/05_blockquote/indented.html Shows a blockquote that is part of a code block. Indentation is preserved. ```markdown > A codeblock ``` -------------------------------- ### Table Cell Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Demonstrates a footnote reference within a table cell. The reference is placed after the content. ```markdown a b c d [↩](#fnref:table) ``` -------------------------------- ### Ruby Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/06_codeblock/with_lang_in_fenced_block.html A simple Ruby method definition within a fenced code block. ```ruby def what? 42 end ``` -------------------------------- ### Table with Code Span and Pipe Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/14_table/simple.html Shows a table cell containing a code span that itself includes a pipe character. ```Markdown Table with code elements This is a `span | with` a pipe. ``` -------------------------------- ### Footnote Definition in Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html Demonstrates a footnote definition that includes a code block. Kramdown preserves code block formatting within definitions. ```markdown 4. code block continued here [↩](#fnref:now) ``` -------------------------------- ### Repeated Footnote Reference Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html Shows a footnote reference used multiple times within the text. Kramdown correctly identifies repeated references. ```markdown A marker [5](#fn:empty) used twice[1](#fn:fn) and thrice[1](#fn:fn). ``` -------------------------------- ### Footnote Reference in Blockquote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html Shows a footnote reference embedded within a blockquote. The reference format remains consistent. ```markdown > a blockquote [2](#fn:3) ``` -------------------------------- ### Preserving Angle Brackets in Indented Blocks Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/09_html/html_to_native/code.html This snippet illustrates the preservation of angle brackets within an indented block. ```text Some very important < thing ``` -------------------------------- ### Footnote Reference in List Item Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html Illustrates a footnote reference within an unordered list item. Kramdown supports these within list structures. ```markdown * and a list item [3](#fn:1) ``` -------------------------------- ### Indented Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/03_paragraph/indented.html An indented block is recognized as a code block. Ensure consistent indentation. ```markdown This is a code block. ``` -------------------------------- ### Horizontal Rule Footnote Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/backlink_inline.html Shows a footnote reference following a horizontal rule. The reference indicates the rule has a footnote. ```markdown * * * [↩](#fnref:hrule) ``` -------------------------------- ### Footnote Definition with Nested Content Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/span/04_footnote/markers.html A footnote definition containing multiple lines, including a nested blockquote. Kramdown supports complex content within definitions. ```markdown 2. other text with more lines > and a quote [↩](#fnref:3) ``` -------------------------------- ### Code Block within a List Item Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/08_list/list_and_others.html A code block nested directly within a list item is rendered as such. Ensure proper indentation for Kramdown to recognize it as a code block. ```markdown * test codeblock test ``` -------------------------------- ### Escaping Pipe Characters in Table Cells Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/14_table/escaping.html Use a backslash before a pipe character to render it literally within a table cell, preventing it from being interpreted as a column separator. ```markdown `cell 1 | cell 2` cell 1 | cell 2 cell 1 cell 2 | continued cell 1 cell `2` cell 1 `code | span` cell 1 `code | span` cell 1 | `code | span` cell 1 cell \`2 cell 3 cell 1\` cell 2 cell 3 cell 1 | cell `2 | cell 3 cell 1` | cell 2 | cell 3 ``` -------------------------------- ### Ending Code Block Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/06_codeblock/normal.html Represents the final code segment. ```plaintext ending code ``` -------------------------------- ### Preserving HTML Entities in Code Spans Source: https://github.com/gettalong/kramdown/blob/master/test/testcases/block/09_html/html_to_native/code.html This snippet shows how HTML entities within a code span are preserved during conversion. ```html This is a `code span with that should be preserved`. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.