From 67522867e296af92f471a8d48e7507122591fa6e Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Fri, 23 Dec 2022 16:52:12 -0500 Subject: [PATCH 1/9] Make ParseSess an optional arg to FormatHandler::handle_formatted_file The only implementaiton of the `FormatHandler` trait is the one implemented for `Session`, and in that implementation we pass the `ParseSess` to `source_file::write_file`, which also takes the `ParseSess` as an optional argument. looking at the implementation of `source_file::write_file`, the `ParseSess` is optionally used to determine the file's original line ending instead of reading the file from the file system again to do so. Given the above explanation, I don't think there's any issue changing the signature of `FormatHandler::handle_formatted_file` and the implementation of `FormatHandler for Session`. --- src/formatting.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/formatting.rs b/src/formatting.rs index cd57a025b67..8948650fc0c 100644 --- a/src/formatting.rs +++ b/src/formatting.rs @@ -256,7 +256,7 @@ impl<'a, T: FormatHandler + 'a> FormatContext<'a, T> { .add_non_formatted_ranges(visitor.skipped_range.borrow().clone()); self.handler.handle_formatted_file( - &self.parse_session, + Some(&self.parse_session), path, visitor.buffer.to_owned(), &mut self.report, @@ -268,7 +268,7 @@ impl<'a, T: FormatHandler + 'a> FormatContext<'a, T> { trait FormatHandler { fn handle_formatted_file( &mut self, - parse_session: &ParseSess, + parse_session: Option<&ParseSess>, path: FileName, result: String, report: &mut FormatReport, @@ -279,14 +279,14 @@ impl<'b, T: Write + 'b> FormatHandler for Session<'b, T> { // Called for each formatted file. fn handle_formatted_file( &mut self, - parse_session: &ParseSess, + parse_session: Option<&ParseSess>, path: FileName, result: String, report: &mut FormatReport, ) -> Result<(), ErrorKind> { if let Some(ref mut out) = self.out { match source_file::write_file( - Some(parse_session), + parse_session, &path, &result, out, From 0d4c4f671218827b1e74c5fdd57e636d4adb1d15 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Fri, 23 Dec 2022 22:43:15 -0500 Subject: [PATCH 2/9] update visibility of items related to markdown code block formatting The visibility of several private items in comments.rs were updated to `pub(crate)`. These items will help when adding support for formatting rust code blocks in markdown files. --- src/comment.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/comment.rs b/src/comment.rs index 7da0f79bd09..b3c9047a853 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -410,7 +410,7 @@ fn identify_comment( } /// Enum indicating if the code block contains rust based on attributes -enum CodeBlockAttribute { +pub(crate) enum CodeBlockAttribute { Rust, NotRust, } @@ -419,7 +419,7 @@ impl CodeBlockAttribute { /// Parse comma separated attributes list. Return rust only if all /// attributes are valid rust attributes /// See - fn new(attributes: &str) -> CodeBlockAttribute { + pub(crate) fn new(attributes: &str) -> CodeBlockAttribute { for attribute in attributes.split(',') { match attribute.trim() { "" | "rust" | "should_panic" | "no_run" | "edition2015" | "edition2018" @@ -954,7 +954,7 @@ fn rewrite_comment_inner( const RUSTFMT_CUSTOM_COMMENT_PREFIX: &str = "//#### "; -fn hide_sharp_behind_comment(s: &str) -> Cow<'_, str> { +pub(crate) fn hide_sharp_behind_comment(s: &str) -> Cow<'_, str> { let s_trimmed = s.trim(); if s_trimmed.starts_with("# ") || s_trimmed == "#" { Cow::from(format!("{RUSTFMT_CUSTOM_COMMENT_PREFIX}{s}")) @@ -963,7 +963,7 @@ fn hide_sharp_behind_comment(s: &str) -> Cow<'_, str> { } } -fn trim_custom_comment_prefix(s: &str) -> String { +pub(crate) fn trim_custom_comment_prefix(s: &str) -> String { s.lines() .map(|line| { let left_trimmed = line.trim_start(); From 1adcbf108c2d497f7a5a8fd45d79fad1324c4475 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Fri, 23 Dec 2022 23:05:11 -0500 Subject: [PATCH 3/9] add `CodeBlockAttribute::is_formattable_rust` method A helper method used to determine if the code block contains rust code that should be formatted. This will help when implementing rust code block formatting in markdown files. --- src/comment.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/comment.rs b/src/comment.rs index b3c9047a853..4a164ecc571 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -430,6 +430,12 @@ impl CodeBlockAttribute { } CodeBlockAttribute::Rust } + + /// Check if the code block was annotated with rust attributes that indicate + /// the code block contains rust code that rustfmt should format. + pub(crate) fn is_formattable_rust(&self) -> bool { + matches!(self, Self::Rust) + } } /// Block that is formatted as an item. From beef9c5a9c03338099c3a0670aa75fdfc04054e3 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi Date: Sat, 9 Sep 2023 17:35:16 -0400 Subject: [PATCH 4/9] Add markdown crate which hand rolls markdown formatting in rustfmt --- markdown/.gitignore | 1 + markdown/Cargo.lock | 158 + markdown/Cargo.toml | 19 + markdown/build.rs | 152 + markdown/rustfmt.toml | 4 + markdown/src/escape.rs | 45 + markdown/src/formatter.rs | 1010 +++ markdown/src/lib.rs | 8 + markdown/src/links.rs | 197 + markdown/src/list.rs | 129 + markdown/src/table.rs | 175 + markdown/src/utils.rs | 6 + markdown/tests/common/mod.rs | 65 + markdown/tests/commonmark_v0_30_spec.rs | 5080 ++++++++++++++ markdown/tests/gfm_spec.rs | 5218 ++++++++++++++ .../tests/spec/commonmark_v0_30_spec.json | 5384 ++++++++++++++ markdown/tests/spec/gfm_spec.json | 6217 +++++++++++++++++ 17 files changed, 23868 insertions(+) create mode 100644 markdown/.gitignore create mode 100644 markdown/Cargo.lock create mode 100644 markdown/Cargo.toml create mode 100644 markdown/build.rs create mode 100644 markdown/rustfmt.toml create mode 100644 markdown/src/escape.rs create mode 100644 markdown/src/formatter.rs create mode 100644 markdown/src/lib.rs create mode 100644 markdown/src/links.rs create mode 100644 markdown/src/list.rs create mode 100644 markdown/src/table.rs create mode 100644 markdown/src/utils.rs create mode 100644 markdown/tests/common/mod.rs create mode 100644 markdown/tests/commonmark_v0_30_spec.rs create mode 100644 markdown/tests/gfm_spec.rs create mode 100644 markdown/tests/spec/commonmark_v0_30_spec.json create mode 100644 markdown/tests/spec/gfm_spec.json diff --git a/markdown/.gitignore b/markdown/.gitignore new file mode 100644 index 00000000000..9f970225adb --- /dev/null +++ b/markdown/.gitignore @@ -0,0 +1 @@ +target/ \ No newline at end of file diff --git a/markdown/Cargo.lock b/markdown/Cargo.lock new file mode 100644 index 00000000000..c63f6adbc44 --- /dev/null +++ b/markdown/Cargo.lock @@ -0,0 +1,158 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "markdown" +version = "0.1.0" +dependencies = [ + "itertools", + "pulldown-cmark", + "serde", + "serde_json", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "memchr" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" + +[[package]] +name = "proc-macro2" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pulldown-cmark" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "serde" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "syn" +version = "2.0.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" diff --git a/markdown/Cargo.toml b/markdown/Cargo.toml new file mode 100644 index 00000000000..9957b1363e6 --- /dev/null +++ b/markdown/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "markdown" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +itertools = "0.10" +pulldown-cmark = { version = "0.9.3", default-features = false } +unicode-width = "0.1" +unicode-segmentation = "1.9" + +[features] +gen-tests = [] + +[build-dependencies] +serde = { version = "1.0.160", features = ["derive"] } +serde_json = "1.0" diff --git a/markdown/build.rs b/markdown/build.rs new file mode 100644 index 00000000000..7a9daebb3e8 --- /dev/null +++ b/markdown/build.rs @@ -0,0 +1,152 @@ +fn main() { + generate_tests_markdown_tests().unwrap() +} + +#[cfg(not(feature = "gen-tests"))] +fn generate_tests_markdown_tests() -> std::io::Result<()> { + Ok(()) +} + +#[cfg(feature = "gen-tests")] +fn generate_tests_markdown_tests() -> std::io::Result<()> { + use std::fs::File; + use std::io::BufWriter; + use std::path::PathBuf; + + let spec_folder = "./tests/spec/"; + let test_folder = "./tests/"; + + let spec_files = [ + ( + "", + "commonmark_v0_30_spec.json", + "https://spec.commonmark.org/0.30/", + ), + ("gfm_", "gfm_spec.json", "https://github.github.com/gfm/"), + ]; + + for (prefix, spec, url) in spec_files { + let input_file = format!("{spec_folder}{spec}"); + let mut output_file = PathBuf::from(format!("{test_folder}{spec}")); + output_file.set_extension("rs"); + + let test_cases: Vec> = serde_json::from_reader(File::open(&input_file)?)?; + let mut output = BufWriter::new(File::create(&output_file)?); + + write_test_cases(&mut output, prefix, test_cases, url) + .expect("generated test case successfully"); + } + + Ok(()) +} + +#[cfg(feature = "gen-tests")] +#[derive(Debug, serde::Deserialize)] +struct TestCase<'a> { + #[serde(rename(deserialize = "markdown"))] + input: std::borrow::Cow<'a, str>, + #[serde(rename(deserialize = "formattedMarkdown"))] + output: Option>, + #[serde(rename(deserialize = "example"))] + id: usize, + section: std::borrow::Cow<'a, str>, + #[serde(default)] + skip: bool, + #[serde(default = "default_test", rename(deserialize = "testMacro"))] + test_macro: std::borrow::Cow<'a, str>, + comment: Option>, +} + +#[cfg(feature = "gen-tests")] +fn default_test() -> std::borrow::Cow<'static, str> { + // Name of the test macro to use + "test_identical_markdown_events".into() +} + +#[cfg(feature = "gen-tests")] +fn write_test_cases( + writer: &mut W, + prefix: &str, + test_cases: Vec>, + url: &str, +) -> std::io::Result<()> +where + W: std::io::Write, +{ + write!(writer, "// @generated\n")?; + write!(writer, "// generated running `cargo build -F gen-tests`\n")?; + write!( + writer, + "// test macros are defined in tests/common/mod.rs\n" + )?; + write!(writer, "mod common;\n")?; + + for test_case in test_cases.into_iter() { + write_test_case(writer, prefix, test_case, url)?; + } + Ok(()) +} + +#[cfg(feature = "gen-tests")] +fn write_test_case( + writer: &mut W, + prefix: &str, + test_case: TestCase<'_>, + url: &str, +) -> std::io::Result<()> { + let url = if url.ends_with("/") { + format!("{}#example-{}", url, test_case.id) + } else { + format!("{}/#example-1{}", url, test_case.id) + }; + + let replace_tab_chars = test_case.input.replace('→', "\t"); + let input = replace_tab_chars.trim_end_matches('\n'); + + if let Some(comment) = test_case.comment { + write!(writer, "\n// {comment}")?; + } + + if test_case.skip { + write!(writer, "\n#[ignore]")?; + } + + write!( + writer, + r##" +#[test] +fn {}markdown_{}_{}() {{ + // {} + {}!("##, + prefix, + test_case + .section + .to_lowercase() + .replace(char::is_whitespace, "_") + .replace("(", "") + .replace(")", ""), + test_case.id, + url, + test_case.test_macro, + )?; + + let has_trailing_whitespace = input.lines().any(|l| l.ends_with(char::is_whitespace)); + if has_trailing_whitespace { + write!(writer, "{:?}", input)?; + } else { + write!(writer, "r##\"{}\"##", input)?; + } + if let Some(expected_output) = test_case.output { + let has_trailing_whitespace = expected_output + .lines() + .any(|l| l.ends_with(char::is_whitespace)); + if has_trailing_whitespace { + write!(writer, ",{:?}", expected_output)?; + } else { + write!(writer, ",r##\"{}\"##", expected_output)?; + } + } + write!(writer, ");")?; + write!(writer, "\n}}\n")?; + Ok(()) +} diff --git a/markdown/rustfmt.toml b/markdown/rustfmt.toml new file mode 100644 index 00000000000..392bceba753 --- /dev/null +++ b/markdown/rustfmt.toml @@ -0,0 +1,4 @@ +error_on_line_overflow = true +error_on_unformatted = true +format_generated_files = false +version = "Two" diff --git a/markdown/src/escape.rs b/markdown/src/escape.rs new file mode 100644 index 00000000000..0a9d922f1e1 --- /dev/null +++ b/markdown/src/escape.rs @@ -0,0 +1,45 @@ +use super::MarkdownFormatter; + +const ATX_HEADER_ESCAPES: [&'static str; 6] = ["# ", "## ", "### ", "#### ", "##### ", "###### "]; + +impl<'i, F> MarkdownFormatter<'i, F> { + pub(super) fn needs_escape(&mut self, input: &str) -> bool { + if !self.last_was_softbreak { + // We _should_ only need to escape after a softbreak since the markdown formatter will + // adjust the indentation. Depending on the context we'll either remove leading spaces + // or add indentation (spaces or '>') depending on if we're in a list or blockquote. + // See as an example where the semantics + // would change without an escape after removing indentation. + return false; + } + + self.last_was_softbreak = false; + + if input.len() <= 2 { + return false; + } + + let Some(first_char) = input.chars().next() else { + return false; + }; + + let is_setext_heading = |value: u8| input.trim_end().bytes().all(|b| b == value); + let is_unordered_list_marker = |value: &str| input.starts_with(value); + let is_thematic_break = |value: u8| input.bytes().all(|b| b == value || b == b' '); + + match first_char { + '#' => ATX_HEADER_ESCAPES + .iter() + .any(|header| input.starts_with(header)), + '=' => is_setext_heading(b'='), + '-' => { + is_unordered_list_marker("- ") || is_setext_heading(b'-') || is_thematic_break(b'-') + } + '_' => is_thematic_break(b'_'), + '*' => is_unordered_list_marker("* ") || is_thematic_break(b'*'), + '+' => is_unordered_list_marker("+ "), + '>' => true, + _ => false, + } + } +} diff --git a/markdown/src/formatter.rs b/markdown/src/formatter.rs new file mode 100644 index 00000000000..aef53e600b2 --- /dev/null +++ b/markdown/src/formatter.rs @@ -0,0 +1,1010 @@ +use std::borrow::Cow; +use std::iter::Peekable; +use std::ops::Range; + +use itertools::Itertools; +use pulldown_cmark::escape::StrWrite; +use pulldown_cmark::{CodeBlockKind, CowStr, Event, HeadingLevel, LinkType, OffsetIter, Tag}; +use pulldown_cmark::{LinkDef, Options, Parser}; + +use crate::links; +use crate::list::{ListMarker, OrderedListMarker, UnorderedListMarker}; +use crate::table::TableState; + +pub struct MarkdownFormatter<'i, F> { + /// Raw markdown input + input: &'i str, + pub(crate) last_was_softbreak: bool, + /// Iterator Supplying Markdown Events + events: Peekable>, + rewrite_buffer: String, + /// Stores code that we might try to format + code_block_buffer: String, + /// Stack that keeps track of nested list markers. + /// Unordered list markers are one of `*`, `+`, or `-`, + /// while ordered lists markers start with 0-9 digits followed by a `.` or `)`. + list_markers: Vec, + /// Stack that keeps track of indentation. + indentation: Vec>, + /// Stack that keeps track of whether we're formatting inside of another element. + nested_context: Vec>, + /// A set of reference link definitions that will be output after formatting. + /// Reference style links contain 3 parts: + /// 1. Text to display + /// 2. URL + /// 3. (Optional) Title + /// ```markdown + /// [title]: link "optional title" + /// ``` + // reference_links: Vec, + reference_links: Vec<(String, String, Option<(String, char)>, Range)>, + /// keep track of the current setext header. + /// ```markdown + /// Header + /// ====== + /// ``` + setext_header: Option<&'i str>, + /// next Start event should push indentation + needs_indent: bool, + table_state: Option>, + last_position: usize, + code_block_formatter: F, +} + +/// Depnding on the formatting context there are a few different buffers where we might want to +/// write formatted markdown events. The StrWrite impl helps us centralize this logic. +impl<'i, F> StrWrite for MarkdownFormatter<'i, F> { + fn write_str(&mut self, text: &str) -> std::io::Result<()> { + if self.in_fenced_code_block() || self.in_indented_code_block() { + self.code_block_buffer.push_str(&text); + } else if self.in_table_header() || self.in_table_row() { + if let Some(state) = self.table_state.as_mut() { + state.write(text.to_owned().into()); + } + } else { + self.rewrite_buffer.push_str(text) + } + Ok(()) + } + + fn write_fmt(&mut self, args: std::fmt::Arguments<'_>) -> std::io::Result<()> { + if self.in_fenced_code_block() || self.in_indented_code_block() { + self.code_block_buffer.write_fmt(args)?; + } else if self.in_table_header() || self.in_table_row() { + if let Some(state) = self.table_state.as_mut() { + let mut text = String::new(); + text.write_fmt(args)?; + state.write(text.into()); + } + } else { + let mut text = String::new(); + text.write_fmt(args)?; + self.rewrite_buffer.write_fmt(args)?; + } + Ok(()) + } +} + +impl<'i, F> MarkdownFormatter<'i, F> { + /// Peek at the next Markdown Event + fn peek(&mut self) -> Option<&Event<'i>> { + self.events.peek().map(|(e, _)| e) + } + + /// Check if the next Event is an `Event::End` + fn is_next_end_event(&mut self) -> bool { + matches!(self.peek(), Some(Event::End(_))) + } + + /// Check if we should write newlines and indentation before the next Start Event + fn check_needs_indent(&mut self, event: &Event<'i>) { + self.needs_indent = match self.peek() { + Some(Event::Start(_) | Event::Rule | Event::Html(_) | Event::End(Tag::Item)) => true, + Some(Event::End(Tag::BlockQuote)) => matches!(event, Event::End(_)), + Some(Event::Text(_)) => matches!(event, Event::End(_) | Event::Start(Tag::Item)), + _ => matches!(event, Event::Rule), + }; + } + + /// Check if we're formatting a fenced code block + fn in_fenced_code_block(&self) -> bool { + matches!( + self.nested_context.last(), + Some(Tag::CodeBlock(CodeBlockKind::Fenced(_))) + ) + } + + /// Check if we're formatting an indented code block + fn in_indented_code_block(&self) -> bool { + matches!( + self.nested_context.last(), + Some(Tag::CodeBlock(CodeBlockKind::Indented)) + ) + } + + /// Check if we're in a paragraph + fn in_paragraph(&self) -> bool { + matches!(self.nested_context.last(), Some(Tag::Paragraph)) + } + + /// Check if we're in a list + fn in_list_item(&self) -> bool { + matches!(self.nested_context.last(), Some(Tag::Item)) + } + + // check if we're formatting a table header + fn in_table_header(&self) -> bool { + self.nested_context + .iter() + .rfind(|tag| **tag == Tag::TableHead) + .is_some() + } + + // check if we're formatting a table row + fn in_table_row(&self) -> bool { + self.nested_context + .iter() + .rfind(|tag| **tag == Tag::TableRow) + .is_some() + } + + /// Check if we're formatting in a nested context + fn is_nested(&self) -> bool { + !self.nested_context.is_empty() + } + + fn count_newlines(&self, range: &Range) -> usize { + if self.last_position == range.start { + return 0; + } + + let snippet = if self.last_position < range.start { + // between two markdown evernts + &self.input[self.last_position..range.start] + } else { + // likely in some nested context + self.input[self.last_position..range.end].trim_end_matches('\n') + }; + + snippet.bytes().filter(|b| *b == b'\n').count() + } + + fn write_indentation(&mut self, use_rewrite_buffer: bool, trim_trailing_whiltespace: bool) { + let last_non_complete_whitespace_indent = self + .indentation + .iter() + .rposition(|indent| !indent.chars().all(char::is_whitespace)); + + let position = if trim_trailing_whiltespace { + let Some(position) = last_non_complete_whitespace_indent else { + // All indents are just whitespace. We don't want to push blank lines + return; + }; + position + } else { + self.indentation.len() + }; + + for (i, indent) in self.indentation.iter().take(position + 1).enumerate() { + let is_last = i == position; + let buffer = if use_rewrite_buffer { + &mut self.rewrite_buffer + } else { + &mut self.rewrite_buffer + }; + + if is_last && trim_trailing_whiltespace { + buffer.push_str(indent.trim()) + } else { + buffer.push_str(&indent) + } + } + } + + fn write_newlines(&mut self, max_newlines: usize) -> std::io::Result<()> { + self.write_newlines_inner(max_newlines, false) + } + + fn write_newlines_no_trailing_whitespace( + &mut self, + max_newlines: usize, + ) -> std::io::Result<()> { + self.write_newlines_inner(max_newlines, true) + } + + fn write_newlines_inner( + &mut self, + max_newlines: usize, + always_trim_trailing_whitespace: bool, + ) -> std::io::Result<()> { + if self.rewrite_buffer.is_empty() { + return Ok(()); + } + let newlines = self + .rewrite_buffer + .chars() + .rev() + .take_while(|c| *c == '\n') + .count(); + + let nested = self.is_nested(); + let newlines_to_write = max_newlines.saturating_sub(newlines); + let next_is_end_event = self.is_next_end_event(); + + for i in 0..newlines_to_write { + let is_last = i == newlines_to_write - 1; + + self.rewrite_buffer.push('\n'); + + if nested { + self.write_indentation(true, !is_last || always_trim_trailing_whitespace); + } + } + if !nested { + self.write_indentation(true, next_is_end_event || always_trim_trailing_whitespace); + } + Ok(()) + } + + fn write_reference_link_inner( + &mut self, + label: &str, + dest: &str, + title: Option<&(String, char)>, + ) -> std::io::Result<()> { + // empty links can be specified with <> + let dest = links::format_link_url(&dest, true); + self.write_newlines(1)?; + if let Some((title, quote)) = title { + write!(self, r#"[{label}]: {dest} {quote}{title}{quote}"#)?; + } else { + write!(self, "[{label}]: {dest}")?; + } + Ok(()) + } + + fn rewrite_reference_links(&mut self, range: &Range) -> std::io::Result<()> { + if self.reference_links.is_empty() { + return Ok(()); + } + // use std::mem::take to work around the borrow checker + let mut reference_links = std::mem::take(&mut self.reference_links); + + loop { + match reference_links.last() { + Some((_, _, _, link_range)) if link_range.start > range.start => { + // The reference link on the top of the stack comes further along in the file + break; + } + None => break, + _ => {} + } + + let (label, dest, title, link_range) = reference_links.pop().expect("we have a value"); + let newlines = self.count_newlines(&link_range); + self.write_newlines(newlines)?; + self.write_reference_link_inner(&label, &dest, title.as_ref())?; + self.last_position = link_range.end; + self.needs_indent = true; + } + + // put the reference_links back + self.reference_links = reference_links; + Ok(()) + } + + /// Write out reference links at the end of the file + fn rewrite_final_reference_links(mut self) -> std::io::Result { + // use std::mem::take to work around the borrow checker + let reference_links = std::mem::take(&mut self.reference_links); + + // need to iterate in reverse because reference_links is a stack + for (label, dest, title, range) in reference_links.into_iter().rev() { + let newlines = self.count_newlines(&range); + self.write_newlines(newlines)?; + + // empty links can be specified with <> + self.write_reference_link_inner(&label, &dest, title.as_ref())?; + self.last_position = range.end + } + Ok(self.rewrite_buffer) + } + + fn join_with_indentation(&mut self, buffer: &str, start_with_indentation: bool) { + if buffer.trim().is_empty() && start_with_indentation { + self.write_indentation(true, true); + return; + } + + let mut lines = buffer.trim_end().lines().peekable(); + while let Some(line) = lines.next() { + let is_last = lines.peek().is_none(); + let is_next_empty = lines + .peek() + .map(|l| l.trim().is_empty()) + .unwrap_or_default(); + + if start_with_indentation { + self.write_indentation(true, line.trim().is_empty()); + } + + if !line.trim().is_empty() { + self.rewrite_buffer.push_str(line) + } + + if !is_last { + self.rewrite_buffer.push('\n'); + } + + if !is_last && !start_with_indentation { + self.write_indentation(true, is_next_empty); + } + } + } +} + +impl<'i, F> MarkdownFormatter<'i, F> +where + F: Fn(&str, String) -> String, +{ + pub fn new(input: &'i str, code_block_formatter: F) -> Self { + let mut options = Options::all(); + options.remove(Options::ENABLE_SMART_PUNCTUATION); + + let parser = Parser::new_ext(input, options); + + let reference_links = parser + .reference_definitions() + .iter() + .sorted_by(|(_, link_a), (_, link_b)| { + // We want to sort these in descending order based on the ranges + // This creates a stack of reference links that we can pop off of. + link_b.span.start.cmp(&link_a.span.start) + }) + .map(|(link_lable, LinkDef { dest, title, span })| { + let full_link = &input[span.clone()]; + if let Some((url, title)) = + links::recover_escaped_link_destination_and_title(full_link, title.is_some()) + { + (link_lable.to_string(), url, title, span.clone()) + } else { + // Couldn't recover URL from source, just use what we've been given + ( + link_lable.to_string(), + dest.to_string(), + title.clone().map(|s| (s.to_string(), '"')), + span.clone(), + ) + } + }) + .collect::>(); + + Self { + input, + last_was_softbreak: false, + events: parser.into_offset_iter().peekable(), + rewrite_buffer: String::with_capacity(input.len() * 2), + code_block_buffer: String::with_capacity(256), + list_markers: vec![], + indentation: vec![], + nested_context: vec![], + reference_links, + setext_header: None, + needs_indent: false, + table_state: None, + last_position: 0, + code_block_formatter: code_block_formatter, + } + } + + fn format_code_buffer(&mut self, info_string: Option<&str>) -> String { + // use std::mem::take to work around the borrow checker + let code_block_buffer = std::mem::take(&mut self.code_block_buffer); + + let Some(info_string) = info_string else { + // An indented code block won't have an info_string + return code_block_buffer; + }; + + // Call the code_block_formatter fn + (self.code_block_formatter)(info_string, code_block_buffer) + } + + fn write_code_block_buffer(&mut self, info_string: Option<&str>) -> std::io::Result<()> { + let code = self.format_code_buffer(info_string); + self.join_with_indentation(&code, info_string.is_some()); + Ok(()) + } + + /// The main entry point for markdown formatting. + pub fn format(mut self) -> std::io::Result { + while let Some((event, range)) = self.events.next() { + let mut last_position = self.input[..range.end] + .bytes() + .rposition(|b| !b.is_ascii_whitespace()) + .unwrap_or(0); + + match event { + Event::Start(tag) => { + self.rewrite_reference_links(&range)?; + last_position = range.start; + self.start_tag(tag.clone(), range)?; + } + Event::End(ref tag) => { + self.end_tag(tag.clone(), range)?; + self.check_needs_indent(&event); + } + Event::Text(ref parsed_text) => { + last_position = range.end; + let starts_with_escape = self.input[..range.start].ends_with('\\'); + let newlines = self.count_newlines(&range); + let text_from_source = CowStr::from(&self.input[range]); + let text = if text_from_source.is_empty() { + // This seems to happen when the parsed text is whitespace only. + // To preserve leading whitespace use the parsed text instead. + parsed_text + } else { + &text_from_source + }; + if self.needs_indent + && newlines > 0 + && (self.in_paragraph() || self.in_list_item()) + { + self.write_newlines(newlines)?; + self.needs_indent = false; + } + + if starts_with_escape || self.needs_escape(&text) { + // recover escape characters + write!(self, "\\{text}")?; + } else { + write!(self, "{text}")?; + } + self.check_needs_indent(&event); + } + Event::Code(_) => { + write!(self, "{}", &self.input[range])?; + } + Event::SoftBreak => { + last_position = range.end; + write!(self, "{}", &self.input[range])?; + self.write_indentation(true, false); + self.last_was_softbreak = true; + } + Event::HardBreak => { + write!(self, "{}", &self.input[range])?; + } + Event::Html(_) => { + let newlines = self.count_newlines(&range); + if self.needs_indent { + self.write_newlines(newlines)?; + } + write!(self, "{}", &self.input[range].trim_end_matches('\n'))?; + self.check_needs_indent(&event); + } + Event::Rule => { + let newlines = self.count_newlines(&range); + self.write_newlines(newlines)?; + write!(self, "{}", &self.input[range])?; + self.check_needs_indent(&event) + } + Event::FootnoteReference(text) => { + write!(self, "[^{text}]")?; + } + Event::TaskListMarker(done) => { + if done { + write!(self, "[x]")?; + } else { + write!(self, "[ ]")?; + } + } + } + self.last_position = last_position + } + debug_assert!(self.nested_context.is_empty()); + self.rewrite_final_reference_links() + } + + fn start_tag(&mut self, tag: Tag<'i>, range: Range) -> std::io::Result<()> { + use Tag::*; + match tag { + Paragraph => { + if self.needs_indent { + let newlines = self.count_newlines(&range); + self.write_newlines(newlines)?; + self.needs_indent = false; + } + self.nested_context.push(tag); + } + Heading(level, _, _) => { + if self.needs_indent { + let newlines = self.count_newlines(&range); + self.write_newlines(newlines)?; + self.needs_indent = false; + } + let full_header = self.input[range].trim(); + + if full_header.contains('\n') && full_header.ends_with(['=', '-']) { + // support for alternative syntax for H1 and H2 + // + let header_marker = full_header.split('\n').last().unwrap().trim(); + self.setext_header.replace(header_marker); + // setext header are handled in `end_tag` + return Ok(()); + } + + let header = match level { + HeadingLevel::H1 => "# ", + HeadingLevel::H2 => "## ", + HeadingLevel::H3 => "### ", + HeadingLevel::H4 => "#### ", + HeadingLevel::H5 => "##### ", + HeadingLevel::H6 => "###### ", + }; + + let empty_header = full_header + .trim_start_matches(header) + .trim_end_matches(|c: char| c.is_whitespace() || matches!(c, '#' | '\\')) + .is_empty(); + + if empty_header { + write!(self, "{}", header.trim())?; + } else { + write!(self, "{header}")?; + } + } + BlockQuote => { + if self.needs_indent { + let newlines = self.count_newlines(&range); + self.write_newlines(newlines)?; + self.needs_indent = false; + } + + if matches!(self.peek(), Some(Event::End(BlockQuote))) { + // Special case handling for empty block quotes + let block_quote_opener = + self.input[range].bytes().filter(|b| *b == b'>').count(); + for i in 0..block_quote_opener { + let is_last = i == block_quote_opener - 1; + write!(self, ">")?; + if !is_last { + write!(self, "\n")?; + } + self.write_indentation(true, false); + } + } else { + self.write_str("> ")?; + } + + self.nested_context.push(tag); + self.indentation.push("> ".into()); + } + CodeBlock(ref kind) => { + let newlines = self.count_newlines(&range); + if self.needs_indent && newlines > 0 { + self.write_newlines(newlines)?; + self.needs_indent = false; + } + match kind { + CodeBlockKind::Fenced(info_string) => { + rewrite_marker(self.input, &range, &mut self.rewrite_buffer)?; + + if info_string.is_empty() { + write!(self, "\n")?; + self.nested_context.push(tag); + return Ok(()); + } + + let starts_with_space = self.input[range.clone()] + .trim_start_matches(['`', '~']) + .starts_with(char::is_whitespace); + + let info_string = self.input[range] + .lines() + .next() + .unwrap_or_else(|| info_string.as_ref()) + .trim_start_matches(['`', '~']) + .trim(); + + if starts_with_space { + write!(self, " {info_string}\n")?; + } else { + write!(self, "{info_string}\n")?; + } + } + CodeBlockKind::Indented => { + // TODO(ytmimi) support tab as an indent + let indentation = " "; + + if !matches!( + self.peek(), + Some(Event::End(CodeBlock(CodeBlockKind::Indented))) + ) { + // Only write indentation if this isn't an empty indented code block + self.write_str(indentation)?; + } + + self.indentation.push(indentation.into()); + } + } + self.nested_context.push(tag); + } + List(value) => { + if self.needs_indent { + let newlines = self.count_newlines(&range); + self.write_newlines(newlines)?; + self.needs_indent = false; + } + + let list_marker = if let Some(number) = value { + let marker = match self.input[range.clone()] + .chars() + .find(|c| ['.', ')'].contains(c)) + .expect("we should find ordered list markers") + { + '.' => OrderedListMarker::Period, + ')' => OrderedListMarker::Parenthesis, + _ => unreachable!(), + }; + let zero_padding = if number != 0 { + self.input[range] + .trim_start() + .bytes() + .take_while(|b| *b == b'0') + .count() + } else { + 0 + }; + + ListMarker::Ordered { + zero_padding: zero_padding, + number: number as usize, + marker, + } + } else { + let marker = match self.input[range] + .chars() + .find(|c| ['*', '+', '-'].contains(c)) + .expect("we should find unorder list marker") + { + '*' => UnorderedListMarker::Asterisk, + '+' => UnorderedListMarker::Plus, + '-' => UnorderedListMarker::Hyphen, + _ => unreachable!(), + }; + ListMarker::Unordered(marker) + }; + + self.list_markers.push(list_marker); + self.nested_context.push(tag); + } + Item => { + let newlines = self.count_newlines(&range); + if self.needs_indent && newlines > 0 { + self.write_newlines(newlines)?; + self.needs_indent = false; + } + + let empty_list_item = matches!(self.peek(), Some(Event::End(Item))); + + // Take list_marker so we can use `write!(self, ...)` + let mut list_marker = self + .list_markers + .pop() + .expect("can't have list item without marker"); + let marker_char = list_marker.marker_char(); + match &list_marker { + ListMarker::Ordered { number, .. } if empty_list_item => { + let zero_padding = list_marker.zero_padding(); + write!(self, "{zero_padding}{number}{marker_char}")?; + } + ListMarker::Ordered { number, .. } => { + let zero_padding = list_marker.zero_padding(); + write!(self, "{zero_padding}{number}{marker_char} ")?; + } + ListMarker::Unordered(_) if empty_list_item => { + write!(self, "{marker_char}")?; + } + ListMarker::Unordered(_) => { + write!(self, "{marker_char} ")?; + } + } + + self.nested_context.push(tag); + // Increment the list marker in case this is a ordered list and + // swap the list marker we took earlier + list_marker.increment_count(); + self.indentation.push(list_marker.indentation()); + self.list_markers.push(list_marker) + } + FootnoteDefinition(label) => { + write!(self, "[^{label}]: ")?; + } + Emphasis => { + rewrite_marker_with_limit(self.input, &range, self, Some(1))?; + } + Strong => { + rewrite_marker_with_limit(self.input, &range, self, Some(2))?; + } + Strikethrough => { + rewrite_marker(self.input, &range, self)?; + } + Link(link_type, ..) => { + let newlines = self.count_newlines(&range); + if self.needs_indent && newlines > 0 { + self.write_newlines(newlines)?; + self.needs_indent = false; + } + + let email_or_auto = matches!(link_type, LinkType::Email | LinkType::Autolink); + let opener = if email_or_auto { "<" } else { "[" }; + self.write_str(opener)?; + self.nested_context.push(tag); + } + Image(..) => { + let newlines = self.count_newlines(&range); + if self.needs_indent && newlines > 0 { + self.write_newlines(newlines)?; + self.needs_indent = false; + } + + write!(self, "![")?; + self.nested_context.push(tag); + } + Table(ref alignment) => { + if self.needs_indent { + let newlines = self.count_newlines(&range); + self.write_newlines(newlines)?; + self.needs_indent = false; + } + self.table_state.replace(TableState::new(alignment.clone())); + write!(self, "|")?; + self.indentation.push("|".into()); + self.nested_context.push(tag); + } + TableHead => { + self.nested_context.push(tag); + } + TableRow => { + self.nested_context.push(tag); + if let Some(state) = self.table_state.as_mut() { + state.push_row() + } + } + TableCell => { + if !matches!(self.peek(), Some(Event::End(TableCell))) { + return Ok(()); + } + + if let Some(state) = self.table_state.as_mut() { + state.write("".into()); + } + } + } + Ok(()) + } + + fn end_tag(&mut self, tag: Tag<'i>, range: Range) -> std::io::Result<()> { + use Tag::*; + match tag { + Paragraph => { + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag, Some(tag)); + } + Heading(_, fragment_identifier, classes) => { + match (fragment_identifier, classes.is_empty()) { + (Some(id), false) => { + let classes = rewirte_header_classes(classes)?; + write!(self, " {{#{id}{classes}}}")?; + } + (Some(id), true) => { + write!(self, " {{#{id}}}")?; + } + (None, false) => { + let classes = rewirte_header_classes(classes)?; + write!(self, " {{{}}}", classes.trim())?; + } + (None, true) => {} + } + + if let Some(marker) = self.setext_header.take() { + self.write_newlines(1)?; + write!(self, "{marker}")?; + } + } + BlockQuote => { + let newlines = self.count_newlines(&range); + if self.needs_indent && newlines > 0 { + // Recover empty block quote lines + if let Some(last) = self.indentation.last_mut() { + // Avoid trailing whitespace by replacing the last indentation with '>' + *last = ">".into() + } + self.write_newlines(newlines)?; + } + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag, Some(tag)); + + let popped_indentation = self + .indentation + .pop() + .expect("we pushed a blockquote marker in start_tag"); + if let Some(indentation) = self.indentation.last_mut() { + if indentation == ">" { + *indentation = popped_indentation + } + } + } + CodeBlock(ref kind) => { + match kind { + CodeBlockKind::Fenced(info_string) => { + self.write_code_block_buffer(Some(info_string))?; + // write closing code fence + self.write_newlines(1)?; + rewrite_marker(self.input, &range, &mut self.rewrite_buffer)?; + } + CodeBlockKind::Indented => { + // Maybe we'll consider formatting indented code blocks?? + self.write_code_block_buffer(None)?; + + let popped_indentation = self + .indentation + .pop() + .expect("we added 4 spaces in start_tag"); + debug_assert_eq!(popped_indentation, " "); + } + } + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag, Some(tag)); + } + List(_) => { + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag, Some(tag)); + self.list_markers.pop(); + + // To prevent the next code block from being interpreted as a list we'll add an + // HTML comment See https://spec.commonmark.org/0.30/#example-308, which states: + // + // To separate consecutive lists of the same type, or to separate a list from an + // indented code block that would otherwise be parsed as a subparagraph of the + // final list item, you can insert a blank HTML comment + if let Some(Event::Start(Tag::CodeBlock(CodeBlockKind::Indented))) = self.peek() { + self.write_newlines(1)?; + write!(self, "\n")?; + write!(self, "")?; + }; + } + Item => { + let newlines = self.count_newlines(&range); + if self.needs_indent && newlines > 0 { + self.write_newlines_no_trailing_whitespace(newlines)?; + } + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag, Some(tag)); + let popped_indentation = self + .indentation + .pop() + .expect("we list item indentation in start_tag"); + + // There should always be a list marker since we don't pop + // list markers off the stack until we've reached the end of the list + if let Some(marker) = self.list_markers.last() { + debug_assert_eq!(marker.indentation(), popped_indentation); + } + + // if the next event is a Start(Item), then we need to set needs_indent + self.needs_indent = matches!(self.peek(), Some(Event::Start(Item))); + } + FootnoteDefinition(_label) => {} + Emphasis => { + rewrite_marker_with_limit(self.input, &range, self, Some(1))?; + } + Strong => { + rewrite_marker_with_limit(self.input, &range, self, Some(2))?; + } + Strikethrough => { + rewrite_marker(self.input, &range, self)?; + } + Link(ref link_type, ref url, ref title) | Image(ref link_type, ref url, ref title) => { + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag.as_ref(), Some(&tag)); + + let text = &self.input[range.clone()]; + + match link_type { + LinkType::Inline => { + if let Some((source_url, title_and_quote)) = + crate::links::find_inline_url_and_title(text) + { + self.write_inline_link(&source_url, title_and_quote)?; + } else { + let title = if title.is_empty() { + None + } else { + Some((title, '"')) + }; + self.write_inline_link(&url, title)?; + } + } + LinkType::Reference | LinkType::ReferenceUnknown => { + let label = crate::links::find_reference_link_label(text); + write!(self, "][{label}]")?; + } + LinkType::Collapsed | LinkType::CollapsedUnknown => write!(self, "][]")?, + LinkType::Shortcut | LinkType::ShortcutUnknown => write!(self, "]")?, + LinkType::Autolink | LinkType::Email => write!(self, ">")?, + } + } + Table(_) => { + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag, Some(tag)); + if let Some(state) = self.table_state.take() { + self.join_with_indentation(&state.format()?, false) + } + let popped_indentation = self.indentation.pop().expect("we added `|` in start_tag"); + debug_assert_eq!(popped_indentation, "|"); + } + TableRow | TableHead => { + let popped_tag = self.nested_context.pop(); + debug_assert_eq!(popped_tag, Some(tag)); + } + TableCell => { + if let Some(state) = self.table_state.as_mut() { + // We finished formatting this cell. Setup the state to format the next cell + state.increment_col_index() + } + } + } + Ok(()) + } +} + +/// Find some marker that denotes the start of a markdown construct. +/// for example, `**` for bold or `_` for italics. +fn find_marker<'i, P>(input: &'i str, range: &Range, predicate: P) -> &'i str +where + P: FnMut(char) -> bool, +{ + let end = if let Some(position) = input[range.start..].chars().position(predicate) { + range.start + position + } else { + range.end + }; + &input[range.start..end] +} + +/// Find some marker, but limit the size +fn rewrite_marker_with_limit<'i, W: StrWrite>( + input: &'i str, + range: &Range, + writer: &mut W, + size_limit: Option, +) -> std::io::Result<()> { + let marker_char = input[range.start..].chars().next().unwrap(); + let marker = find_marker(input, &range, |c| c != marker_char); + if let Some(mark_max_width) = size_limit { + write!(writer, "{}", &marker[..mark_max_width]) + } else { + write!(writer, "{marker}") + } +} + +/// Finds a marker in the source text and writes it to the buffer +fn rewrite_marker<'i, W: StrWrite>( + input: &'i str, + range: &Range, + writer: &mut W, +) -> std::io::Result<()> { + rewrite_marker_with_limit(input, range, writer, None) +} + +/// Rewrite a list of h1, h2, h3, h4, h5, h6 classes +fn rewirte_header_classes(classes: Vec<&str>) -> std::io::Result { + let item_len = classes.iter().map(|i| i.len()).sum::(); + let capacity = item_len + classes.len() * 2; + let mut result = String::with_capacity(capacity); + for class in classes { + write!(result, " .{class}")?; + } + Ok(result) +} diff --git a/markdown/src/lib.rs b/markdown/src/lib.rs new file mode 100644 index 00000000000..9391a90fa6b --- /dev/null +++ b/markdown/src/lib.rs @@ -0,0 +1,8 @@ +mod escape; +mod formatter; +mod links; +mod list; +mod table; +mod utils; + +pub use formatter::MarkdownFormatter; diff --git a/markdown/src/links.rs b/markdown/src/links.rs new file mode 100644 index 00000000000..389a63931b8 --- /dev/null +++ b/markdown/src/links.rs @@ -0,0 +1,197 @@ +use super::MarkdownFormatter; +use pulldown_cmark::escape::StrWrite; +use std::borrow::Cow; + +impl<'i, F> MarkdownFormatter<'i, F> { + pub(super) fn write_inline_link>( + &mut self, + url: &str, + title: Option<(S, char)>, + ) -> std::io::Result<()> { + let url = format_link_url(url, false); + match title { + Some((title, quote)) if quote == ')' => { + write!(self, r#"]({url} ({}))"#, title.as_ref())? + } + Some((title, quote)) => write!(self, r#"]({url} {quote}{}{quote})"#, title.as_ref())?, + None => write!(self, "]({url})")?, + } + Ok(()) + } +} + +pub(crate) fn format_link_url(url: &str, wrap_empty_urls: bool) -> Cow<'_, str> { + if wrap_empty_urls && url.is_empty() { + Cow::from("<>") + } else if !url.starts_with('<') && !url.ends_with('>') && url.contains(' ') + || !balanced_parens(&url) + { + // https://spec.commonmark.org/0.30/#link-destination + Cow::from(format!("<{url}>")) + } else { + url.into() + } +} + +/// Check if the parens are balanced +fn balanced_parens(url: &str) -> bool { + let mut stack = vec![]; + let mut was_last_escape = false; + + for b in url.bytes() { + if !was_last_escape && b == b'(' { + stack.push(b); + continue; + } + + if !was_last_escape && b == b')' { + if let Some(top) = stack.last() { + if *top != b'(' { + return false; + } + stack.pop(); + } else { + return false; + } + } + was_last_escape = b == b'\\'; + } + stack.is_empty() +} + +/// Search for enclosing balanced brackets +fn find_text_within_last_set_of_balance_bracket( + label: &str, + opener: u8, + closer: u8, + halt_condition: Option bool>, +) -> (usize, usize) { + let mut stack = vec![]; + let mut was_last_escape = false; + + let mut start = 0; + let mut end = label.len(); + + let mut bytes = label.bytes().enumerate().peekable(); + + while let Some((index, byte)) = bytes.next() { + if !was_last_escape && byte == opener { + stack.push(index) + } + + if !was_last_escape && byte == closer { + if let Some(start_index) = stack.pop() { + start = start_index; + end = index; + } + + if stack.is_empty() && halt_condition.is_some() { + match (bytes.peek(), halt_condition) { + (Some((_, byte)), Some(halt_condition)) if halt_condition(*byte) => { + break; + } + _ => {} + } + } + } + was_last_escape = byte == b'\\' + } + (start, end + 1) +} + +/// Reference links are expected to be well formed: +/// [foo][bar] -> bar +/// [link \[bar][ref] -> ref +pub(super) fn find_reference_link_label(input: &str) -> &str { + let (start, end) = find_text_within_last_set_of_balance_bracket(input, b'[', b']', None); + // +1 to move past '[' + // -1 to move before ']' + input[start + 1..end - 1].trim() +} + +/// Inline links are expected to be well formed: +/// [link](/uri) -> '/uri' +/// [link]() -> '/my uri' +pub(super) fn find_inline_url_and_title(input: &str) -> Option<(String, Option<(String, char)>)> { + let (_, end) = + find_text_within_last_set_of_balance_bracket(input, b'[', b']', Some(|b| b == b'(')); + // +1 to move past '(' + // -1 to move before ')' + let inline_url = input[end + 1..input.len() - 1].trim(); + if inline_url.is_empty() { + return Some((String::new(), None)); + } + + split_inline_url_from_title(inline_url, inline_url.ends_with(['"', '\'', ')'])) +} + +// The link must have a title if we're calling this +fn link_title_start(link: &[u8]) -> usize { + let last = *link.last().expect("links titles must have quotes"); + let opener = if last == b')' { b'(' } else { last }; + + // offset by 2 to skip triling quote + let mut index = link.len() - 2; + while index.saturating_sub(1) != 0 { + if link[index] == opener && link[index - 1] != b'\\' { + return index; + } + index -= 1; + } + + // Odd case where a title is in the place of a url + //https://spec.commonmark.org/0.30/#example-503 + 0 +} + +/// Grab the link destination from the source text +/// +/// `pulldown_cmark` unescape link destinations and titles so grabbing the escaped link +/// from the source is the easiest way to maintain all the escaped characters. +pub(super) fn recover_escaped_link_destination_and_title( + complete_link: &str, + has_title: bool, +) -> Option<(String, Option<(String, char)>)> { + let rest = complete_link.split_once(":").map(|(_, rest)| rest.trim())?; + split_inline_url_from_title(rest, has_title) +} + +fn trim_angle_brackes(url: &str) -> &str { + if url.starts_with('<') && url.ends_with('>') { + url[1..url.len() - 1].trim() + } else { + url.trim() + } +} + +fn split_inline_url_from_title( + input: &str, + has_title: bool, +) -> Option<(String, Option<(String, char)>)> { + // If both link destination and link title are present, they must be separated by spaces, tabs, + // and up to one line ending. + let has_space = input.contains(char::is_whitespace); + let only_link = !has_space && has_title; + let link_start = link_title_start(input.as_bytes()); + if only_link || !has_title || link_start == 0 { + return Some((trim_angle_brackes(input).to_string(), None)); + } + + let (mut url, mut title_with_quotes) = input.split_at(link_start); + + url = url.trim(); + + title_with_quotes = title_with_quotes.trim(); + + // Remove the wrapping quotes from the title + let quote = title_with_quotes + .bytes() + .last() + .expect("url title has a quote") as char; + let title = &title_with_quotes[1..title_with_quotes.len() - 1]; + + Some(( + trim_angle_brackes(url).to_string(), + Some((title.to_string(), quote)), + )) +} diff --git a/markdown/src/list.rs b/markdown/src/list.rs new file mode 100644 index 00000000000..811e9250279 --- /dev/null +++ b/markdown/src/list.rs @@ -0,0 +1,129 @@ +use std::borrow::Cow; +// Including all these spaces might be overkill, but it probably doesn't hurt. +// In practice we'll see far fewer digits in an ordered list. +// +// mentions that: +// +// An ordered list marker is a sequence of 1–9 arabic digits (0-9), followed by either a . +// character or a ) character. (The reason for the length limit is that with 10 digits we +// start seeing integer overflows in some browsers.) +// +const LIST_INDENTATION: &'static str = " "; +const ZERO_PADDING: &'static str = "00000000000000000000"; + +#[derive(Debug)] +pub(super) enum ListMarker { + Ordered { + zero_padding: usize, + number: usize, + marker: OrderedListMarker, + }, + Unordered(UnorderedListMarker), +} + +impl std::default::Default for ListMarker { + fn default() -> Self { + ListMarker::Unordered(UnorderedListMarker::Asterisk) + } +} + +impl ListMarker { + pub(super) fn increment_count(&mut self) { + match self { + Self::Ordered { number, .. } => { + *number += 1; + } + Self::Unordered(_) => {} + } + } + + pub(super) fn indentation(&self) -> Cow<'static, str> { + let indent_index = self.indentation_len(); + + if indent_index <= LIST_INDENTATION.len() { + Cow::from(&LIST_INDENTATION[..indent_index]) + } else { + // I think it would be extreamly rare to hit his case + Cow::from(" ".repeat(indent_index)) + } + } + + pub(super) fn marker_char(&self) -> char { + match self { + Self::Ordered { marker, .. } => marker.into(), + Self::Unordered(marker) => marker.into(), + } + } + + pub(super) fn zero_padding(&self) -> &'static str { + match self { + Self::Ordered { zero_padding, .. } => &ZERO_PADDING[..zero_padding.clone()], + Self::Unordered(_) => "", + } + } + + fn indentation_len(&self) -> usize { + match self { + Self::Ordered { + zero_padding, + number, + .. + } => { + let char_len = number.checked_ilog10().unwrap_or(0) + 1; + // + 2 to for '. ' + zero_padding + (char_len + 2) as usize + } + Self::Unordered(_) => 2, + } + } +} + +#[derive(Debug)] +pub(super) enum OrderedListMarker { + Period, + Parenthesis, +} + +impl From for char { + fn from(value: OrderedListMarker) -> Self { + match value { + OrderedListMarker::Period => '.', + OrderedListMarker::Parenthesis => ')', + } + } +} + +impl From<&OrderedListMarker> for char { + fn from(value: &OrderedListMarker) -> Self { + match value { + OrderedListMarker::Period => '.', + OrderedListMarker::Parenthesis => ')', + } + } +} + +#[derive(Debug)] +pub(super) enum UnorderedListMarker { + Asterisk, + Plus, + Hyphen, +} + +impl From for char { + fn from(value: UnorderedListMarker) -> Self { + match value { + UnorderedListMarker::Asterisk => '*', + UnorderedListMarker::Plus => '+', + UnorderedListMarker::Hyphen => '-', + } + } +} +impl From<&UnorderedListMarker> for char { + fn from(value: &UnorderedListMarker) -> Self { + match value { + UnorderedListMarker::Asterisk => '*', + UnorderedListMarker::Plus => '+', + UnorderedListMarker::Hyphen => '-', + } + } +} diff --git a/markdown/src/table.rs b/markdown/src/table.rs new file mode 100644 index 00000000000..3702f13260b --- /dev/null +++ b/markdown/src/table.rs @@ -0,0 +1,175 @@ +use crate::utils::unicode_str_width; +use itertools::{EitherOrBoth, Itertools}; +use pulldown_cmark::escape::StrWrite; +use pulldown_cmark::Alignment; +use unicode_segmentation::UnicodeSegmentation; +use std::borrow::Cow; + +pub(super) struct TableState<'a> { + /// Alignment markers for HTML rendering + /// * :-: center alignment + /// * :-- left alignment + /// * --: right alignmet + /// * --- no alignmet + alignment: Vec, + /// Table headers + headers: Vec>, + /// Keep track of the widest cell in each column. + /// Will use this info to align columns when rewriting + max_column_width: Vec, + /// Table rows + body: Vec>>, + /// Keep track of whether or not we're writing to the headers + write_to_body: bool, + /// Keep track of Which cell we're currently operating on. + col_index: usize, +} + +impl<'a> TableState<'a> { + pub(super) fn new(alignment: Vec) -> Self { + let capacity = alignment.len(); + Self { + alignment, + headers: Vec::with_capacity(capacity), + max_column_width: vec![3; capacity], + body: vec![], + write_to_body: false, + col_index: 0, + } + } + + /// Write some values to the table state. + pub(super) fn write(&mut self, value: Cow<'a, str>) { + if self.write_to_body { + // push or update the body + self.write_cell(value) + } else { + // push or update the headers + self.write_header(value) + } + } + + /// Allows the caller to advance the internal col_index. + /// All subsequent calls to `write` will affect the next cell + pub(super) fn increment_col_index(&mut self) { + self.col_index += 1; + } + + /// Update the table state to start writing to the table body + pub(super) fn push_row(&mut self) { + self.body.push(Vec::with_capacity(self.alignment.len())); + self.write_to_body = true; + self.col_index = 0; + } + + fn write_header(&mut self, text: Cow<'a, str>) { + let header_width = unicode_str_width(&text); + if let Some(column_header) = self.headers.get_mut(self.col_index) { + *column_header += text; + + let current_width = self + .max_column_width + .get_mut(self.col_index) + .expect("should be set"); + *current_width += header_width; + } else { + self.headers.push(text); + self.update_column_width(self.col_index, header_width); + } + } + + fn write_cell(&mut self, text: Cow<'a, str>) { + let row = self + .body + .last_mut() + .expect("can only write cells after push_row called"); + + if let Some(cell_value) = row.get_mut(self.col_index) { + let current_width = unicode_str_width(cell_value) + unicode_str_width(&text); + *cell_value += text; + self.update_column_width(self.col_index, current_width); + } else { + let cell_width = unicode_str_width(&text); + row.push(text); + self.update_column_width(self.col_index, cell_width); + } + } + + fn update_column_width(&mut self, index: usize, column_width: usize) { + if let Some(old_column_width) = self.max_column_width.get_mut(index) { + if *old_column_width < column_width { + *old_column_width = column_width + } + } + } + + pub(super) fn format(self) -> std::io::Result { + let mut result = String::new(); + self.rewrite_header(&mut result)?; + self.rewrite_alignment(&mut result)?; + self.rewrite_body(&mut result)?; + Ok(result) + } + + fn write_wth_padding(buffer: &mut String, value: &str, mut size: usize) -> std::io::Result<()> { + let offset = UnicodeSegmentation::graphemes(value, true).map(|grapheme| unicode_str_width(grapheme).saturating_sub(1)).sum(); + size = size.saturating_sub(offset); + write!(buffer, " {value:<0$} |", size) + } + + fn rewrite_header(&self, buffer: &mut String) -> std::io::Result<()> { + for (header, width) in self.headers.iter().zip(self.max_column_width.iter()) { + Self::write_wth_padding(buffer, header, *width)?; + } + Ok(()) + } + + fn rewrite_alignment(&self, buffer: &mut String) -> std::io::Result<()> { + buffer.push('\n'); + for (alignment, width) in self.alignment.iter().zip(self.max_column_width.iter()) { + let alignment = match alignment { + Alignment::Center => { + // :-: + // (- 2 to account for 2 `:`) + format!(":{:-^1$}:", "-", width - 2) + } + Alignment::Left => { + // :-- + format!("{:-<1$}", ":", width) + } + Alignment::Right => { + // --: + format!("{:->1$}", ":", width) + } + Alignment::None => { + // --- + "-".repeat(*width) + } + }; + Self::write_wth_padding(buffer, &alignment, *width)?; + } + Ok(()) + } + + fn rewrite_body(&self, buffer: &mut String) -> std::io::Result<()> { + for row in self.body.iter() { + buffer.push('\n'); + for either_or_both in row.iter().zip_longest(self.max_column_width.iter()) { + match either_or_both { + EitherOrBoth::Both(cell, width) => { + Self::write_wth_padding(buffer, cell, *width)?; + } + EitherOrBoth::Right(width) => { + Self::write_wth_padding(buffer, "", *width)?; + } + EitherOrBoth::Left(_) => { + // There may be fewer cells in a row, but there should never be more cells. + // See https://github.github.com/gfm/#example-204 and the preceding text + unreachable!() + } + } + } + } + Ok(()) + } +} diff --git a/markdown/src/utils.rs b/markdown/src/utils.rs new file mode 100644 index 00000000000..a08a66b5e25 --- /dev/null +++ b/markdown/src/utils.rs @@ -0,0 +1,6 @@ +use unicode_width::UnicodeWidthStr; + +// Duplicated from the rustfmt::util module +pub(crate) fn unicode_str_width(s: &str) -> usize { + s.width() +} diff --git a/markdown/tests/common/mod.rs b/markdown/tests/common/mod.rs new file mode 100644 index 00000000000..ef0d2b0fe9c --- /dev/null +++ b/markdown/tests/common/mod.rs @@ -0,0 +1,65 @@ +/// Collection of common functions / macros used for generating tests + +pub fn check_formatted_markdown<'a, 'o>( + input: &'a str, + expected_output: &'o str, +) -> std::borrow::Cow<'a, str> { + let formatter = markdown::MarkdownFormatter::new(input, |_, code_block| code_block); + let formatted = formatter.format().expect("formatting wont fail"); + assert_eq!(formatted, expected_output); + formatted.into() +} + +#[macro_export] +macro_rules! test { + ($input:expr) => { + test!($input, $input) + }; + ($input:expr, $output:expr) => {{ + let formatted = crate::common::check_formatted_markdown($input, $output); + if $input != $output { + // Perform an idempotency check on the formatted markdown + crate::common::check_formatted_markdown(&formatted, &formatted); + } + formatted + }}; +} + +#[macro_export] +macro_rules! test_identical_markdown_events { + ($input:expr) => { + test_identical_markdown_events!($input, $input) + }; + ($input:expr, $output:expr) => { + let formatted = crate::test!($input, $output); + + let mut options = pulldown_cmark::Options::all(); + options.remove(pulldown_cmark::Options::ENABLE_SMART_PUNCTUATION); + let input_events = pulldown_cmark::Parser::new_ext($input, options.clone()).into_iter() + .filter(|e| { + // We don't care about removing empty text nodes + !matches!(e, pulldown_cmark::Event::Text(text) if text.trim().is_empty()) + }) + .collect::>(); + let formatted_events = pulldown_cmark::Parser::new_ext(&formatted, options) + .into_iter() + .filter(|e| { + // We don't care about removing empty text nodes + !matches!(e, pulldown_cmark::Event::Text(text) if text.trim().is_empty()) + }) + .collect::>(); + + assert_eq!(formatted_events.len(), input_events.len()); + + let all_events_equal = input_events.into_iter() + .zip(formatted_events.into_iter()) + .all(|(input_event, formatted_event)| match (&input_event, &formatted_event) + { + (pulldown_cmark::Event::Text(input), pulldown_cmark::Event::Text(formatted)) => { + input.trim() == formatted.trim() + }, + _ => input_event == formatted_event + }); + assert!(all_events_equal) + }; +} diff --git a/markdown/tests/commonmark_v0_30_spec.rs b/markdown/tests/commonmark_v0_30_spec.rs new file mode 100644 index 00000000000..fcdc25b3db3 --- /dev/null +++ b/markdown/tests/commonmark_v0_30_spec.rs @@ -0,0 +1,5080 @@ +// @generated +// generated running `cargo build -F gen-tests` +// test macros are defined in tests/common/mod.rs +mod common; + +#[test] +fn markdown_tabs_1() { + // https://spec.commonmark.org/0.30/#example-1 + test_identical_markdown_events!(r##" foo baz bim"##,r##" foo baz bim"##); +} + +#[test] +fn markdown_tabs_2() { + // https://spec.commonmark.org/0.30/#example-2 + test_identical_markdown_events!(r##" foo baz bim"##,r##" foo baz bim"##); +} + +#[test] +fn markdown_tabs_3() { + // https://spec.commonmark.org/0.30/#example-3 + test_identical_markdown_events!(r##" a a + ὐ a"##); +} + +#[test] +fn markdown_tabs_4() { + // https://spec.commonmark.org/0.30/#example-4 + test_identical_markdown_events!(r##" - foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn markdown_tabs_5() { + // https://spec.commonmark.org/0.30/#example-5 + test_identical_markdown_events!(r##"- foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn markdown_tabs_6() { + // https://spec.commonmark.org/0.30/#example-6 + test_identical_markdown_events!(r##"> foo"##,r##"> foo"##); +} + +#[test] +fn markdown_tabs_7() { + // https://spec.commonmark.org/0.30/#example-7 + test_identical_markdown_events!(r##"- foo"##,r##"- foo"##); +} + +#[test] +fn markdown_tabs_8() { + // https://spec.commonmark.org/0.30/#example-8 + test_identical_markdown_events!(r##" foo + bar"##,r##" foo + bar"##); +} + +#[test] +fn markdown_tabs_9() { + // https://spec.commonmark.org/0.30/#example-9 + test_identical_markdown_events!(r##" - foo + - bar + - baz"##,r##"- foo + - bar + - baz"##); +} + +#[test] +fn markdown_tabs_10() { + // https://spec.commonmark.org/0.30/#example-10 + test_identical_markdown_events!(r##"# Foo"##,r##"# Foo"##); +} + +#[test] +fn markdown_tabs_11() { + // https://spec.commonmark.org/0.30/#example-11 + test_identical_markdown_events!("*\t*\t*\t"); +} + +#[test] +fn markdown_backslash_escapes_12() { + // https://spec.commonmark.org/0.30/#example-12 + test_identical_markdown_events!(r##"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~"##); +} + +#[test] +fn markdown_backslash_escapes_13() { + // https://spec.commonmark.org/0.30/#example-13 + test_identical_markdown_events!(r##"\ \A\a\ \3\φ\«"##); +} + +#[test] +fn markdown_backslash_escapes_14() { + // https://spec.commonmark.org/0.30/#example-14 + test_identical_markdown_events!(r##"\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity"##); +} + +#[test] +fn markdown_backslash_escapes_15() { + // https://spec.commonmark.org/0.30/#example-15 + test_identical_markdown_events!(r##"\\*emphasis*"##); +} + +#[test] +fn markdown_backslash_escapes_16() { + // https://spec.commonmark.org/0.30/#example-16 + test_identical_markdown_events!(r##"foo\ +bar"##); +} + +#[test] +fn markdown_backslash_escapes_17() { + // https://spec.commonmark.org/0.30/#example-17 + test_identical_markdown_events!(r##"`` \[\` ``"##); +} + +#[test] +fn markdown_backslash_escapes_18() { + // https://spec.commonmark.org/0.30/#example-18 + test_identical_markdown_events!(r##" \[\]"##); +} + +#[test] +fn markdown_backslash_escapes_19() { + // https://spec.commonmark.org/0.30/#example-19 + test_identical_markdown_events!(r##"~~~ +\[\] +~~~"##); +} + +#[test] +fn markdown_backslash_escapes_20() { + // https://spec.commonmark.org/0.30/#example-20 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_backslash_escapes_21() { + // https://spec.commonmark.org/0.30/#example-21 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_backslash_escapes_22() { + // https://spec.commonmark.org/0.30/#example-22 + test_identical_markdown_events!(r##"[foo](/bar\* "ti\*tle")"##,r##"[foo](/bar\* "ti\*tle")"##); +} + +#[test] +fn markdown_backslash_escapes_23() { + // https://spec.commonmark.org/0.30/#example-23 + test_identical_markdown_events!(r##"[foo] + +[foo]: /bar\* "ti\*tle""##,r##"[foo] + +[foo]: /bar\* "ti\*tle""##); +} + +#[test] +fn markdown_backslash_escapes_24() { + // https://spec.commonmark.org/0.30/#example-24 + test_identical_markdown_events!(r##"``` foo\+bar +foo +```"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_25() { + // https://spec.commonmark.org/0.30/#example-25 + test_identical_markdown_events!(r##"  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸"##,r##"  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_26() { + // https://spec.commonmark.org/0.30/#example-26 + test_identical_markdown_events!(r##"# Ӓ Ϡ �"##,r##"# Ӓ Ϡ �"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_27() { + // https://spec.commonmark.org/0.30/#example-27 + test_identical_markdown_events!(r##"" ആ ಫ"##,r##"" ആ ಫ"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_28() { + // https://spec.commonmark.org/0.30/#example-28 + test_identical_markdown_events!(r##"  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?;"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_29() { + // https://spec.commonmark.org/0.30/#example-29 + test_identical_markdown_events!(r##"©"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_30() { + // https://spec.commonmark.org/0.30/#example-30 + test_identical_markdown_events!(r##"&MadeUpEntity;"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_31() { + // https://spec.commonmark.org/0.30/#example-31 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_32() { + // https://spec.commonmark.org/0.30/#example-32 + test_identical_markdown_events!(r##"[foo](/föö "föö")"##,r##"[foo](/föö "föö")"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_33() { + // https://spec.commonmark.org/0.30/#example-33 + test_identical_markdown_events!(r##"[foo] + +[foo]: /föö "föö""##,r##"[foo] + +[foo]: /föö "föö""##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_34() { + // https://spec.commonmark.org/0.30/#example-34 + test_identical_markdown_events!(r##"``` föö +foo +```"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_35() { + // https://spec.commonmark.org/0.30/#example-35 + test_identical_markdown_events!(r##"`föö`"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_36() { + // https://spec.commonmark.org/0.30/#example-36 + test_identical_markdown_events!(r##" föfö"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_37() { + // https://spec.commonmark.org/0.30/#example-37 + test_identical_markdown_events!(r##"*foo* +*foo*"##,r##"*foo* +*foo*"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_38() { + // https://spec.commonmark.org/0.30/#example-38 + test_identical_markdown_events!(r##"* foo + +* foo"##,r##"* foo + +* foo"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_39() { + // https://spec.commonmark.org/0.30/#example-39 + test_identical_markdown_events!(r##"foo bar"##,r##"foo bar"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_40() { + // https://spec.commonmark.org/0.30/#example-40 + test_identical_markdown_events!(r##" foo"##,r##" foo"##); +} + +#[test] +fn markdown_entity_and_numeric_character_references_41() { + // https://spec.commonmark.org/0.30/#example-41 + test_identical_markdown_events!(r##"[a](url "tit")"##,r##"[a](url "tit")"##); +} + +#[test] +fn markdown_precedence_42() { + // https://spec.commonmark.org/0.30/#example-42 + test_identical_markdown_events!(r##"- `one +- two`"##); +} + +#[test] +fn markdown_thematic_breaks_43() { + // https://spec.commonmark.org/0.30/#example-43 + test_identical_markdown_events!(r##"*** +--- +___"##); +} + +#[test] +fn markdown_thematic_breaks_44() { + // https://spec.commonmark.org/0.30/#example-44 + test_identical_markdown_events!(r##"+++"##); +} + +#[test] +fn markdown_thematic_breaks_45() { + // https://spec.commonmark.org/0.30/#example-45 + test_identical_markdown_events!(r##"==="##); +} + +#[test] +fn markdown_thematic_breaks_46() { + // https://spec.commonmark.org/0.30/#example-46 + test_identical_markdown_events!(r##"-- +** +__"##,r##"-- +** +__"##); +} + +#[test] +fn markdown_thematic_breaks_47() { + // https://spec.commonmark.org/0.30/#example-47 + test_identical_markdown_events!(r##" *** + *** + ***"##,r##"*** +*** +***"##); +} + +#[test] +fn markdown_thematic_breaks_48() { + // https://spec.commonmark.org/0.30/#example-48 + test_identical_markdown_events!(r##" ***"##); +} + +#[test] +fn markdown_thematic_breaks_49() { + // https://spec.commonmark.org/0.30/#example-49 + test!(r##"Foo + ***"##,r##"Foo +\***"##); +} + +#[test] +fn markdown_thematic_breaks_50() { + // https://spec.commonmark.org/0.30/#example-50 + test_identical_markdown_events!(r##"_____________________________________"##); +} + +#[test] +fn markdown_thematic_breaks_51() { + // https://spec.commonmark.org/0.30/#example-51 + test_identical_markdown_events!(r##" - - -"##,r##"- - -"##); +} + +#[test] +fn markdown_thematic_breaks_52() { + // https://spec.commonmark.org/0.30/#example-52 + test_identical_markdown_events!(r##" ** * ** * ** * **"##,r##"** * ** * ** * **"##); +} + +#[test] +fn markdown_thematic_breaks_53() { + // https://spec.commonmark.org/0.30/#example-53 + test_identical_markdown_events!(r##"- - - -"##); +} + +#[test] +fn markdown_thematic_breaks_54() { + // https://spec.commonmark.org/0.30/#example-54 + test_identical_markdown_events!("- - - - "); +} + +#[test] +fn markdown_thematic_breaks_55() { + // https://spec.commonmark.org/0.30/#example-55 + test_identical_markdown_events!(r##"_ _ _ _ a + +a------ + +---a---"##); +} + +#[test] +fn markdown_thematic_breaks_56() { + // https://spec.commonmark.org/0.30/#example-56 + test_identical_markdown_events!(r##" *-*"##,r##"*-*"##); +} + +#[test] +fn markdown_thematic_breaks_57() { + // https://spec.commonmark.org/0.30/#example-57 + test_identical_markdown_events!(r##"- foo +*** +- bar"##); +} + +#[test] +fn markdown_thematic_breaks_58() { + // https://spec.commonmark.org/0.30/#example-58 + test_identical_markdown_events!(r##"Foo +*** +bar"##); +} + +#[test] +fn markdown_thematic_breaks_59() { + // https://spec.commonmark.org/0.30/#example-59 + test_identical_markdown_events!(r##"Foo +--- +bar"##); +} + +#[test] +fn markdown_thematic_breaks_60() { + // https://spec.commonmark.org/0.30/#example-60 + test_identical_markdown_events!(r##"* Foo +* * * +* Bar"##); +} + +#[test] +fn markdown_thematic_breaks_61() { + // https://spec.commonmark.org/0.30/#example-61 + test_identical_markdown_events!(r##"- Foo +- * * *"##); +} + +#[test] +fn markdown_atx_headings_62() { + // https://spec.commonmark.org/0.30/#example-62 + test_identical_markdown_events!(r##"# foo +## foo +### foo +#### foo +##### foo +###### foo"##); +} + +#[test] +fn markdown_atx_headings_63() { + // https://spec.commonmark.org/0.30/#example-63 + test_identical_markdown_events!(r##"####### foo"##); +} + +#[test] +fn markdown_atx_headings_64() { + // https://spec.commonmark.org/0.30/#example-64 + test_identical_markdown_events!(r##"#5 bolt + +#hashtag"##); +} + +#[test] +fn markdown_atx_headings_65() { + // https://spec.commonmark.org/0.30/#example-65 + test_identical_markdown_events!(r##"\## foo"##); +} + +#[test] +fn markdown_atx_headings_66() { + // https://spec.commonmark.org/0.30/#example-66 + test_identical_markdown_events!(r##"# foo *bar* \*baz\*"##); +} + +#[test] +fn markdown_atx_headings_67() { + // https://spec.commonmark.org/0.30/#example-67 + test_identical_markdown_events!("# foo ",r##"# foo"##); +} + +#[test] +fn markdown_atx_headings_68() { + // https://spec.commonmark.org/0.30/#example-68 + test_identical_markdown_events!(r##" ### foo + ## foo + # foo"##,r##"### foo +## foo +# foo"##); +} + +#[test] +fn markdown_atx_headings_69() { + // https://spec.commonmark.org/0.30/#example-69 + test_identical_markdown_events!(r##" # foo"##); +} + +#[test] +fn markdown_atx_headings_70() { + // https://spec.commonmark.org/0.30/#example-70 + test_identical_markdown_events!(r##"foo + # bar"##,r##"foo +\# bar"##); +} + +#[test] +fn markdown_atx_headings_71() { + // https://spec.commonmark.org/0.30/#example-71 + test_identical_markdown_events!(r##"## foo ## + ### bar ###"##,r##"## foo +### bar"##); +} + +#[test] +fn markdown_atx_headings_72() { + // https://spec.commonmark.org/0.30/#example-72 + test_identical_markdown_events!(r##"# foo ################################## +##### foo ##"##,r##"# foo +##### foo"##); +} + +#[test] +fn markdown_atx_headings_73() { + // https://spec.commonmark.org/0.30/#example-73 + test_identical_markdown_events!("### foo ### ",r##"### foo"##); +} + +#[test] +fn markdown_atx_headings_74() { + // https://spec.commonmark.org/0.30/#example-74 + test_identical_markdown_events!(r##"### foo ### b"##); +} + +#[test] +fn markdown_atx_headings_75() { + // https://spec.commonmark.org/0.30/#example-75 + test_identical_markdown_events!(r##"# foo#"##); +} + +#[test] +fn markdown_atx_headings_76() { + // https://spec.commonmark.org/0.30/#example-76 + test_identical_markdown_events!(r##"### foo \### +## foo #\## +# foo \#"##); +} + +#[test] +fn markdown_atx_headings_77() { + // https://spec.commonmark.org/0.30/#example-77 + test_identical_markdown_events!(r##"**** +## foo +****"##); +} + +#[test] +fn markdown_atx_headings_78() { + // https://spec.commonmark.org/0.30/#example-78 + test_identical_markdown_events!(r##"Foo bar +# baz +Bar foo"##); +} + +#[test] +fn markdown_atx_headings_79() { + // https://spec.commonmark.org/0.30/#example-79 + test_identical_markdown_events!("## \n#\n### ###",r##"## +# +###"##); +} + +#[test] +fn markdown_setext_headings_80() { + // https://spec.commonmark.org/0.30/#example-80 + test_identical_markdown_events!(r##"Foo *bar* +========= + +Foo *bar* +---------"##); +} + +#[test] +fn markdown_setext_headings_81() { + // https://spec.commonmark.org/0.30/#example-81 + test_identical_markdown_events!(r##"Foo *bar +baz* +===="##); +} + +#[test] +fn markdown_setext_headings_82() { + // https://spec.commonmark.org/0.30/#example-82 + test_identical_markdown_events!(" Foo *bar\nbaz*\t\n====",r##"Foo *bar +baz* +===="##); +} + +#[test] +fn markdown_setext_headings_83() { + // https://spec.commonmark.org/0.30/#example-83 + test_identical_markdown_events!(r##"Foo +------------------------- + +Foo +="##); +} + +#[test] +fn markdown_setext_headings_84() { + // https://spec.commonmark.org/0.30/#example-84 + test_identical_markdown_events!(r##" Foo +--- + + Foo +----- + + Foo + ==="##,r##"Foo +--- + +Foo +----- + +Foo +==="##); +} + +#[test] +fn markdown_setext_headings_85() { + // https://spec.commonmark.org/0.30/#example-85 + test_identical_markdown_events!(r##" Foo + --- + + Foo +---"##); +} + +#[test] +fn markdown_setext_headings_86() { + // https://spec.commonmark.org/0.30/#example-86 + test_identical_markdown_events!("Foo\n ---- ",r##"Foo +----"##); +} + +#[test] +fn markdown_setext_headings_87() { + // https://spec.commonmark.org/0.30/#example-87 + test_identical_markdown_events!(r##"Foo + ---"##,r##"Foo +\---"##); +} + +#[test] +fn markdown_setext_headings_88() { + // https://spec.commonmark.org/0.30/#example-88 + test_identical_markdown_events!(r##"Foo += = + +Foo +--- -"##); +} + +#[test] +fn markdown_setext_headings_89() { + // https://spec.commonmark.org/0.30/#example-89 + test_identical_markdown_events!("Foo \n-----",r##"Foo +-----"##); +} + +#[test] +fn markdown_setext_headings_90() { + // https://spec.commonmark.org/0.30/#example-90 + test_identical_markdown_events!(r##"Foo\ +----"##); +} + +#[test] +fn markdown_setext_headings_91() { + // https://spec.commonmark.org/0.30/#example-91 + test_identical_markdown_events!(r##"`Foo +---- +` + +"##); +} + +#[test] +fn markdown_setext_headings_92() { + // https://spec.commonmark.org/0.30/#example-92 + test_identical_markdown_events!(r##"> Foo +---"##); +} + +#[test] +fn markdown_setext_headings_93() { + // https://spec.commonmark.org/0.30/#example-93 + test_identical_markdown_events!(r##"> foo +bar +==="##,r##"> foo +> bar +> \==="##); +} + +#[test] +fn markdown_setext_headings_94() { + // https://spec.commonmark.org/0.30/#example-94 + test_identical_markdown_events!(r##"- Foo +---"##); +} + +#[test] +fn markdown_setext_headings_95() { + // https://spec.commonmark.org/0.30/#example-95 + test_identical_markdown_events!(r##"Foo +Bar +---"##); +} + +#[test] +fn markdown_setext_headings_96() { + // https://spec.commonmark.org/0.30/#example-96 + test_identical_markdown_events!(r##"--- +Foo +--- +Bar +--- +Baz"##); +} + +#[test] +fn markdown_setext_headings_97() { + // https://spec.commonmark.org/0.30/#example-97 + test_identical_markdown_events!(r##" +===="##,r##"===="##); +} + +#[test] +fn markdown_setext_headings_98() { + // https://spec.commonmark.org/0.30/#example-98 + test_identical_markdown_events!(r##"--- +---"##); +} + +#[test] +fn markdown_setext_headings_99() { + // https://spec.commonmark.org/0.30/#example-99 + test_identical_markdown_events!(r##"- foo +-----"##); +} + +#[test] +fn markdown_setext_headings_100() { + // https://spec.commonmark.org/0.30/#example-100 + test_identical_markdown_events!(r##" foo +---"##); +} + +#[test] +fn markdown_setext_headings_101() { + // https://spec.commonmark.org/0.30/#example-101 + test_identical_markdown_events!(r##"> foo +-----"##); +} + +#[test] +fn markdown_setext_headings_102() { + // https://spec.commonmark.org/0.30/#example-102 + test_identical_markdown_events!(r##"\> foo +------"##); +} + +#[test] +fn markdown_setext_headings_103() { + // https://spec.commonmark.org/0.30/#example-103 + test_identical_markdown_events!(r##"Foo + +bar +--- +baz"##); +} + +#[test] +fn markdown_setext_headings_104() { + // https://spec.commonmark.org/0.30/#example-104 + test_identical_markdown_events!(r##"Foo +bar + +--- + +baz"##); +} + +#[test] +fn markdown_setext_headings_105() { + // https://spec.commonmark.org/0.30/#example-105 + test_identical_markdown_events!(r##"Foo +bar +* * * +baz"##); +} + +#[test] +fn markdown_setext_headings_106() { + // https://spec.commonmark.org/0.30/#example-106 + test_identical_markdown_events!(r##"Foo +bar +\--- +baz"##); +} + +#[test] +fn markdown_indented_code_blocks_107() { + // https://spec.commonmark.org/0.30/#example-107 + test_identical_markdown_events!(r##" a simple + indented code block"##); +} + +#[test] +fn markdown_indented_code_blocks_108() { + // https://spec.commonmark.org/0.30/#example-108 + test_identical_markdown_events!(r##" - foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn markdown_indented_code_blocks_109() { + // https://spec.commonmark.org/0.30/#example-109 + test_identical_markdown_events!(r##"1. foo + + - bar"##,r##"1. foo + + - bar"##); +} + +#[test] +fn markdown_indented_code_blocks_110() { + // https://spec.commonmark.org/0.30/#example-110 + test_identical_markdown_events!(r##" + *hi* + + - one"##); +} + +#[test] +fn markdown_indented_code_blocks_111() { + // https://spec.commonmark.org/0.30/#example-111 + test_identical_markdown_events!(" chunk1\n\n chunk2\n \n \n \n chunk3",r##" chunk1 + + chunk2 + + + + chunk3"##); +} + +#[test] +fn markdown_indented_code_blocks_112() { + // https://spec.commonmark.org/0.30/#example-112 + test_identical_markdown_events!(" chunk1\n \n chunk2",r##" chunk1 + + chunk2"##); +} + +#[test] +fn markdown_indented_code_blocks_113() { + // https://spec.commonmark.org/0.30/#example-113 + test_identical_markdown_events!(r##"Foo + bar"##,r##"Foo +bar"##); +} + +#[test] +fn markdown_indented_code_blocks_114() { + // https://spec.commonmark.org/0.30/#example-114 + test_identical_markdown_events!(r##" foo +bar"##); +} + +#[test] +fn markdown_indented_code_blocks_115() { + // https://spec.commonmark.org/0.30/#example-115 + test_identical_markdown_events!(r##"# Heading + foo +Heading +------ + foo +----"##); +} + +#[test] +fn markdown_indented_code_blocks_116() { + // https://spec.commonmark.org/0.30/#example-116 + test_identical_markdown_events!(r##" foo + bar"##); +} + +#[test] +fn markdown_indented_code_blocks_117() { + // https://spec.commonmark.org/0.30/#example-117 + test_identical_markdown_events!("\n \n foo\n ",r##" foo"##); +} + +#[test] +fn markdown_indented_code_blocks_118() { + // https://spec.commonmark.org/0.30/#example-118 + test_identical_markdown_events!(" foo ",r##" foo"##); +} + +#[test] +fn markdown_fenced_code_blocks_119() { + // https://spec.commonmark.org/0.30/#example-119 + test_identical_markdown_events!(r##"``` +< + > +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_120() { + // https://spec.commonmark.org/0.30/#example-120 + test_identical_markdown_events!(r##"~~~ +< + > +~~~"##); +} + +#[test] +fn markdown_fenced_code_blocks_121() { + // https://spec.commonmark.org/0.30/#example-121 + test_identical_markdown_events!(r##"`` +foo +``"##); +} + +#[test] +fn markdown_fenced_code_blocks_122() { + // https://spec.commonmark.org/0.30/#example-122 + test_identical_markdown_events!(r##"``` +aaa +~~~ +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_123() { + // https://spec.commonmark.org/0.30/#example-123 + test_identical_markdown_events!(r##"~~~ +aaa +``` +~~~"##); +} + +#[test] +fn markdown_fenced_code_blocks_124() { + // https://spec.commonmark.org/0.30/#example-124 + test_identical_markdown_events!(r##"```` +aaa +``` +``````"##,r##"```` +aaa +``` +````"##); +} + +#[test] +fn markdown_fenced_code_blocks_125() { + // https://spec.commonmark.org/0.30/#example-125 + test_identical_markdown_events!(r##"~~~~ +aaa +~~~ +~~~~"##); +} + +#[test] +fn markdown_fenced_code_blocks_126() { + // https://spec.commonmark.org/0.30/#example-126 + test_identical_markdown_events!(r##"```"##,r##"``` +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_127() { + // https://spec.commonmark.org/0.30/#example-127 + test!(r##"````` + +``` +aaa"##,r##"````` + +``` +aaa +`````"##); +} + +#[test] +fn markdown_fenced_code_blocks_128() { + // https://spec.commonmark.org/0.30/#example-128 + test_identical_markdown_events!(r##"> ``` +> aaa + +bbb"##,r##"> ``` +> aaa +> ``` + +bbb"##); +} + +#[test] +fn markdown_fenced_code_blocks_129() { + // https://spec.commonmark.org/0.30/#example-129 + test_identical_markdown_events!("```\n\n \n```",r##"``` +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_130() { + // https://spec.commonmark.org/0.30/#example-130 + test_identical_markdown_events!(r##"``` +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_131() { + // https://spec.commonmark.org/0.30/#example-131 + test_identical_markdown_events!(r##" ``` + aaa +aaa +```"##,r##"``` +aaa +aaa +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_132() { + // https://spec.commonmark.org/0.30/#example-132 + test!(r##" ``` +aaa + aaa +aaa + ```"##,r##"``` +aaa +aaa +aaa +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_133() { + // https://spec.commonmark.org/0.30/#example-133 + test!(r##" ``` + aaa + aaa + aaa + ```"##,r##"``` +aaa + aaa +aaa +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_134() { + // https://spec.commonmark.org/0.30/#example-134 + test_identical_markdown_events!(r##" ``` + aaa + ```"##); +} + +#[test] +fn markdown_fenced_code_blocks_135() { + // https://spec.commonmark.org/0.30/#example-135 + test_identical_markdown_events!(r##"``` +aaa + ```"##,r##"``` +aaa +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_136() { + // https://spec.commonmark.org/0.30/#example-136 + test_identical_markdown_events!(r##" ``` +aaa + ```"##,r##"``` +aaa +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_137() { + // https://spec.commonmark.org/0.30/#example-137 + test!(r##"``` +aaa + ```"##,r##"``` +aaa + ``` +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_138() { + // https://spec.commonmark.org/0.30/#example-138 + test_identical_markdown_events!(r##"``` ``` +aaa"##); +} + +#[test] +fn markdown_fenced_code_blocks_139() { + // https://spec.commonmark.org/0.30/#example-139 + test!(r##"~~~~~~ +aaa +~~~ ~~"##,r##"~~~~~~ +aaa +~~~ ~~ +~~~~~~"##); +} + +#[test] +fn markdown_fenced_code_blocks_140() { + // https://spec.commonmark.org/0.30/#example-140 + test_identical_markdown_events!(r##"foo +``` +bar +``` +baz"##); +} + +#[test] +fn markdown_fenced_code_blocks_141() { + // https://spec.commonmark.org/0.30/#example-141 + test_identical_markdown_events!(r##"foo +--- +~~~ +bar +~~~ +# baz"##); +} + +#[test] +fn markdown_fenced_code_blocks_142() { + // https://spec.commonmark.org/0.30/#example-142 + test_identical_markdown_events!(r##"```ruby +def foo(x) + return 3 +end +```"##); +} + +#[test] +fn markdown_fenced_code_blocks_143() { + // https://spec.commonmark.org/0.30/#example-143 + test_identical_markdown_events!(r##"~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~"##,r##"~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~"##); +} + +#[test] +fn markdown_fenced_code_blocks_144() { + // https://spec.commonmark.org/0.30/#example-144 + test_identical_markdown_events!(r##"````; +````"##); +} + +#[test] +fn markdown_fenced_code_blocks_145() { + // https://spec.commonmark.org/0.30/#example-145 + test_identical_markdown_events!(r##"``` aa ``` +foo"##); +} + +#[test] +fn markdown_fenced_code_blocks_146() { + // https://spec.commonmark.org/0.30/#example-146 + test_identical_markdown_events!(r##"~~~ aa ``` ~~~ +foo +~~~"##); +} + +#[test] +fn markdown_fenced_code_blocks_147() { + // https://spec.commonmark.org/0.30/#example-147 + test_identical_markdown_events!(r##"``` +``` aaa +```"##); +} + +#[test] +fn markdown_html_blocks_148() { + // https://spec.commonmark.org/0.30/#example-148 + test_identical_markdown_events!(r##"
+
+**Hello**,
+
+_world_.
+
+
"##); +} + +#[test] +fn markdown_html_blocks_149() { + // https://spec.commonmark.org/0.30/#example-149 + test_identical_markdown_events!(r##" + + + +
+ hi +
+ +okay."##); +} + +#[test] +fn markdown_html_blocks_150() { + // https://spec.commonmark.org/0.30/#example-150 + test_identical_markdown_events!(r##"
+ *hello* + "##,r##" +*foo*"##); +} + +#[test] +fn markdown_html_blocks_152() { + // https://spec.commonmark.org/0.30/#example-152 + test_identical_markdown_events!(r##"
+ +*Markdown* + +
"##); +} + +#[test] +fn markdown_html_blocks_153() { + // https://spec.commonmark.org/0.30/#example-153 + test_identical_markdown_events!(r##"
+
"##); +} + +#[test] +fn markdown_html_blocks_154() { + // https://spec.commonmark.org/0.30/#example-154 + test_identical_markdown_events!(r##"
+
"##); +} + +#[test] +fn markdown_html_blocks_155() { + // https://spec.commonmark.org/0.30/#example-155 + test_identical_markdown_events!(r##"
+*foo* + +*bar*"##); +} + +#[test] +fn markdown_html_blocks_156() { + // https://spec.commonmark.org/0.30/#example-156 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_html_blocks_160() { + // https://spec.commonmark.org/0.30/#example-160 + test_identical_markdown_events!(r##"
+foo +
"##); +} + +#[test] +fn markdown_html_blocks_161() { + // https://spec.commonmark.org/0.30/#example-161 + test_identical_markdown_events!(r##"
+``` c +int x = 33; +```"##); +} + +#[test] +fn markdown_html_blocks_162() { + // https://spec.commonmark.org/0.30/#example-162 + test_identical_markdown_events!(r##" +*bar* +"##); +} + +#[test] +fn markdown_html_blocks_163() { + // https://spec.commonmark.org/0.30/#example-163 + test_identical_markdown_events!(r##" +*bar* +"##); +} + +#[test] +fn markdown_html_blocks_164() { + // https://spec.commonmark.org/0.30/#example-164 + test_identical_markdown_events!(r##" +*bar* +"##); +} + +#[test] +fn markdown_html_blocks_165() { + // https://spec.commonmark.org/0.30/#example-165 + test_identical_markdown_events!(r##" +*bar*"##); +} + +#[test] +fn markdown_html_blocks_166() { + // https://spec.commonmark.org/0.30/#example-166 + test_identical_markdown_events!(r##" +*foo* +"##); +} + +#[test] +fn markdown_html_blocks_167() { + // https://spec.commonmark.org/0.30/#example-167 + test_identical_markdown_events!(r##" + +*foo* + +"##); +} + +#[test] +fn markdown_html_blocks_168() { + // https://spec.commonmark.org/0.30/#example-168 + test_identical_markdown_events!(r##"*foo*"##); +} + +#[test] +fn markdown_html_blocks_169() { + // https://spec.commonmark.org/0.30/#example-169 + test_identical_markdown_events!(r##"

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay"##); +} + +#[test] +fn markdown_html_blocks_170() { + // https://spec.commonmark.org/0.30/#example-170 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn markdown_html_blocks_171() { + // https://spec.commonmark.org/0.30/#example-171 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_html_blocks_172() { + // https://spec.commonmark.org/0.30/#example-172 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn markdown_html_blocks_173() { + // https://spec.commonmark.org/0.30/#example-173 + test_identical_markdown_events!(r##" +*foo*"##); +} + +#[test] +fn markdown_html_blocks_177() { + // https://spec.commonmark.org/0.30/#example-177 + test_identical_markdown_events!(r##"*bar* +*baz*"##); +} + +#[test] +fn markdown_html_blocks_178() { + // https://spec.commonmark.org/0.30/#example-178 + test_identical_markdown_events!(r##"1. *bar*"##); +} + +#[test] +fn markdown_html_blocks_179() { + // https://spec.commonmark.org/0.30/#example-179 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn markdown_html_blocks_180() { + // https://spec.commonmark.org/0.30/#example-180 + test_identical_markdown_events!(r##"'; + +?> +okay"##); +} + +#[test] +fn markdown_html_blocks_181() { + // https://spec.commonmark.org/0.30/#example-181 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_html_blocks_182() { + // https://spec.commonmark.org/0.30/#example-182 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn markdown_html_blocks_183() { + // https://spec.commonmark.org/0.30/#example-183 + test_identical_markdown_events!(r##" + + "##,r##" + + "##); +} + +#[test] +fn markdown_html_blocks_184() { + // https://spec.commonmark.org/0.30/#example-184 + test_identical_markdown_events!(r##"
+ +
"##,r##"
+ +
"##); +} + +#[test] +fn markdown_html_blocks_185() { + // https://spec.commonmark.org/0.30/#example-185 + test_identical_markdown_events!(r##"Foo +
+bar +
"##); +} + +#[test] +fn markdown_html_blocks_186() { + // https://spec.commonmark.org/0.30/#example-186 + test_identical_markdown_events!(r##"
+bar +
+*foo*"##); +} + +#[test] +fn markdown_html_blocks_187() { + // https://spec.commonmark.org/0.30/#example-187 + test_identical_markdown_events!(r##"Foo + +baz"##); +} + +#[test] +fn markdown_html_blocks_188() { + // https://spec.commonmark.org/0.30/#example-188 + test_identical_markdown_events!(r##"
+ +*Emphasized* text. + +
"##); +} + +#[test] +fn markdown_html_blocks_189() { + // https://spec.commonmark.org/0.30/#example-189 + test_identical_markdown_events!(r##"
+*Emphasized* text. +
"##); +} + +#[test] +fn markdown_html_blocks_190() { + // https://spec.commonmark.org/0.30/#example-190 + test_identical_markdown_events!(r##" + + + + + + + +
+Hi +
"##); +} + +#[test] +fn markdown_html_blocks_191() { + // https://spec.commonmark.org/0.30/#example-191 + test_identical_markdown_events!(r##" + + + + + + + +
+ Hi +
"##,r##" + + + + + + + +
+ Hi +
"##); +} + +#[test] +fn markdown_link_reference_definitions_192() { + // https://spec.commonmark.org/0.30/#example-192 + test_identical_markdown_events!(r##"[foo]: /url "title" + +[foo]"##,r##"[foo]: /url "title" + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_193() { + // https://spec.commonmark.org/0.30/#example-193 + test_identical_markdown_events!(" [foo]: \n /url \n 'the title' \n\n[foo]",r##"[foo]: /url 'the title' + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_194() { + // https://spec.commonmark.org/0.30/#example-194 + test_identical_markdown_events!(r##"[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]]"##,r##"[Foo*bar\]]: my_(url) 'title (with parens)' + +[Foo*bar\]]"##); +} + +#[test] +fn markdown_link_reference_definitions_195() { + // https://spec.commonmark.org/0.30/#example-195 + test_identical_markdown_events!(r##"[Foo bar]: + +'title' + +[Foo bar]"##,r##"[Foo bar]: 'title' + +[Foo bar]"##); +} + +#[test] +fn markdown_link_reference_definitions_196() { + // https://spec.commonmark.org/0.30/#example-196 + test_identical_markdown_events!(r##"[foo]: /url ' +title +line1 +line2 +' + +[foo]"##,r##"[foo]: /url ' +title +line1 +line2 +' + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_197() { + // https://spec.commonmark.org/0.30/#example-197 + test_identical_markdown_events!(r##"[foo]: /url 'title + +with blank line' + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_198() { + // https://spec.commonmark.org/0.30/#example-198 + test_identical_markdown_events!(r##"[foo]: +/url + +[foo]"##,r##"[foo]: /url + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_199() { + // https://spec.commonmark.org/0.30/#example-199 + test_identical_markdown_events!(r##"[foo]: + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_200() { + // https://spec.commonmark.org/0.30/#example-200 + test_identical_markdown_events!(r##"[foo]: <> + +[foo]"##,r##"[foo]: <> + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_201() { + // https://spec.commonmark.org/0.30/#example-201 + test_identical_markdown_events!(r##"[foo]: (baz) + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_202() { + // https://spec.commonmark.org/0.30/#example-202 + test_identical_markdown_events!(r##"[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo]"##,r##"[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_203() { + // https://spec.commonmark.org/0.30/#example-203 + test_identical_markdown_events!(r##"[foo] + +[foo]: url"##); +} + +#[test] +fn markdown_link_reference_definitions_204() { + // https://spec.commonmark.org/0.30/#example-204 + test_identical_markdown_events!(r##"[foo] + +[foo]: first +[foo]: second"##,r##"[foo] + +[foo]: first"##); +} + +#[test] +fn markdown_link_reference_definitions_205() { + // https://spec.commonmark.org/0.30/#example-205 + test_identical_markdown_events!(r##"[FOO]: /url + +[Foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_206() { + // https://spec.commonmark.org/0.30/#example-206 + test_identical_markdown_events!(r##"[ΑΓΩ]: /φου + +[αγω]"##,r##"[ΑΓΩ]: /φου + +[αγω]"##); +} + +#[test] +fn markdown_link_reference_definitions_207() { + // https://spec.commonmark.org/0.30/#example-207 + test_identical_markdown_events!(r##"[foo]: /url"##); +} + +#[test] +fn markdown_link_reference_definitions_208() { + // https://spec.commonmark.org/0.30/#example-208 + test_identical_markdown_events!(r##"[ +foo +]: /url +bar"##,r##"[ foo ]: /url +bar"##); +} + +#[test] +fn markdown_link_reference_definitions_209() { + // https://spec.commonmark.org/0.30/#example-209 + test_identical_markdown_events!(r##"[foo]: /url "title" ok"##); +} + +// FIXME(ytmim) the "title" is duplcated here +#[ignore] +#[test] +fn markdown_link_reference_definitions_210() { + // https://spec.commonmark.org/0.30/#example-210 + test_identical_markdown_events!(r##"[foo]: /url +"title" ok"##,r##"[foo]: /url "title""title" ok"##); +} + +#[test] +fn markdown_link_reference_definitions_211() { + // https://spec.commonmark.org/0.30/#example-211 + test_identical_markdown_events!(r##" [foo]: /url "title" + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_212() { + // https://spec.commonmark.org/0.30/#example-212 + test_identical_markdown_events!(r##"``` +[foo]: /url +``` + +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_213() { + // https://spec.commonmark.org/0.30/#example-213 + test_identical_markdown_events!(r##"Foo +[bar]: /baz + +[bar]"##); +} + +#[test] +fn markdown_link_reference_definitions_214() { + // https://spec.commonmark.org/0.30/#example-214 + test_identical_markdown_events!(r##"# [Foo] +[foo]: /url +> bar"##); +} + +#[test] +fn markdown_link_reference_definitions_215() { + // https://spec.commonmark.org/0.30/#example-215 + test_identical_markdown_events!(r##"[foo]: /url +bar +=== +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_216() { + // https://spec.commonmark.org/0.30/#example-216 + test_identical_markdown_events!(r##"[foo]: /url +=== +[foo]"##); +} + +#[test] +fn markdown_link_reference_definitions_217() { + // https://spec.commonmark.org/0.30/#example-217 + test_identical_markdown_events!(r##"[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz]"##,r##"[foo]: /foo-url "foo" +[bar]: /bar-url "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz]"##); +} + +#[test] +fn markdown_link_reference_definitions_218() { + // https://spec.commonmark.org/0.30/#example-218 + test!(r##"[foo] + +> [foo]: /url"##,r##"[foo] + +> +[foo]: /url"##); +} + +#[test] +fn markdown_paragraphs_219() { + // https://spec.commonmark.org/0.30/#example-219 + test_identical_markdown_events!(r##"aaa + +bbb"##); +} + +#[test] +fn markdown_paragraphs_220() { + // https://spec.commonmark.org/0.30/#example-220 + test_identical_markdown_events!(r##"aaa +bbb + +ccc +ddd"##); +} + +#[test] +fn markdown_paragraphs_221() { + // https://spec.commonmark.org/0.30/#example-221 + test_identical_markdown_events!(r##"aaa + + +bbb"##); +} + +#[test] +fn markdown_paragraphs_222() { + // https://spec.commonmark.org/0.30/#example-222 + test_identical_markdown_events!(r##" aaa + bbb"##,r##"aaa +bbb"##); +} + +#[test] +fn markdown_paragraphs_223() { + // https://spec.commonmark.org/0.30/#example-223 + test_identical_markdown_events!(r##"aaa + bbb + ccc"##,r##"aaa +bbb +ccc"##); +} + +#[test] +fn markdown_paragraphs_224() { + // https://spec.commonmark.org/0.30/#example-224 + test_identical_markdown_events!(r##" aaa +bbb"##,r##"aaa +bbb"##); +} + +#[test] +fn markdown_paragraphs_225() { + // https://spec.commonmark.org/0.30/#example-225 + test_identical_markdown_events!(r##" aaa +bbb"##); +} + +#[test] +fn markdown_paragraphs_226() { + // https://spec.commonmark.org/0.30/#example-226 + test_identical_markdown_events!("aaa \nbbb "); +} + +#[test] +fn markdown_blank_lines_227() { + // https://spec.commonmark.org/0.30/#example-227 + test_identical_markdown_events!(" \n\naaa\n \n\n# aaa\n\n ",r##"aaa + + +# aaa"##); +} + +#[test] +fn markdown_block_quotes_228() { + // https://spec.commonmark.org/0.30/#example-228 + test_identical_markdown_events!(r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn markdown_block_quotes_229() { + // https://spec.commonmark.org/0.30/#example-229 + test_identical_markdown_events!(r##"># Foo +>bar +> baz"##,r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn markdown_block_quotes_230() { + // https://spec.commonmark.org/0.30/#example-230 + test_identical_markdown_events!(r##" > # Foo + > bar + > baz"##,r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn markdown_block_quotes_231() { + // https://spec.commonmark.org/0.30/#example-231 + test_identical_markdown_events!(r##" > # Foo + > bar + > baz"##); +} + +#[test] +fn markdown_block_quotes_232() { + // https://spec.commonmark.org/0.30/#example-232 + test_identical_markdown_events!(r##"> # Foo +> bar +baz"##,r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn markdown_block_quotes_233() { + // https://spec.commonmark.org/0.30/#example-233 + test_identical_markdown_events!(r##"> bar +baz +> foo"##,r##"> bar +> baz +> foo"##); +} + +#[test] +fn markdown_block_quotes_234() { + // https://spec.commonmark.org/0.30/#example-234 + test_identical_markdown_events!(r##"> foo +---"##); +} + +#[test] +fn markdown_block_quotes_235() { + // https://spec.commonmark.org/0.30/#example-235 + test_identical_markdown_events!(r##"> - foo +- bar"##); +} + +#[test] +fn markdown_block_quotes_236() { + // https://spec.commonmark.org/0.30/#example-236 + test_identical_markdown_events!(r##"> foo + bar"##); +} + +#[test] +fn markdown_block_quotes_237() { + // https://spec.commonmark.org/0.30/#example-237 + test_identical_markdown_events!(r##"> ``` +foo +```"##,r##"> ``` +> +> ``` +foo +``` +```"##); +} + +#[test] +fn markdown_block_quotes_238() { + // https://spec.commonmark.org/0.30/#example-238 + test_identical_markdown_events!(r##"> foo + - bar"##,r##"> foo +> \- bar"##); +} + +#[test] +fn markdown_block_quotes_239() { + // https://spec.commonmark.org/0.30/#example-239 + test_identical_markdown_events!(r##">"##); +} + +#[test] +fn markdown_block_quotes_240() { + // https://spec.commonmark.org/0.30/#example-240 + test_identical_markdown_events!(">\n> \n> ",r##"> +> +>"##); +} + +#[test] +fn markdown_block_quotes_241() { + // https://spec.commonmark.org/0.30/#example-241 + test_identical_markdown_events!(">\n> foo\n> ",r##"> foo +>"##); +} + +#[test] +fn markdown_block_quotes_242() { + // https://spec.commonmark.org/0.30/#example-242 + test_identical_markdown_events!(r##"> foo + +> bar"##); +} + +#[test] +fn markdown_block_quotes_243() { + // https://spec.commonmark.org/0.30/#example-243 + test_identical_markdown_events!(r##"> foo +> bar"##); +} + +#[test] +fn markdown_block_quotes_244() { + // https://spec.commonmark.org/0.30/#example-244 + test_identical_markdown_events!(r##"> foo +> +> bar"##); +} + +#[test] +fn markdown_block_quotes_245() { + // https://spec.commonmark.org/0.30/#example-245 + test_identical_markdown_events!(r##"foo +> bar"##); +} + +#[test] +fn markdown_block_quotes_246() { + // https://spec.commonmark.org/0.30/#example-246 + test_identical_markdown_events!(r##"> aaa +*** +> bbb"##); +} + +#[test] +fn markdown_block_quotes_247() { + // https://spec.commonmark.org/0.30/#example-247 + test_identical_markdown_events!(r##"> bar +baz"##,r##"> bar +> baz"##); +} + +#[test] +fn markdown_block_quotes_248() { + // https://spec.commonmark.org/0.30/#example-248 + test_identical_markdown_events!(r##"> bar + +baz"##); +} + +#[test] +fn markdown_block_quotes_249() { + // https://spec.commonmark.org/0.30/#example-249 + test_identical_markdown_events!(r##"> bar +> +baz"##); +} + +#[test] +fn markdown_block_quotes_250() { + // https://spec.commonmark.org/0.30/#example-250 + test_identical_markdown_events!(r##"> > > foo +bar"##,r##"> > > foo +> > > bar"##); +} + +#[test] +fn markdown_block_quotes_251() { + // https://spec.commonmark.org/0.30/#example-251 + test_identical_markdown_events!(r##">>> foo +> bar +>>baz"##,r##"> > > foo +> > > bar +> > > baz"##); +} + +#[test] +fn markdown_block_quotes_252() { + // https://spec.commonmark.org/0.30/#example-252 + test_identical_markdown_events!(r##"> code + +> not code"##,r##"> code + +> not code"##); +} + +#[test] +fn markdown_list_items_253() { + // https://spec.commonmark.org/0.30/#example-253 + test_identical_markdown_events!(r##"A paragraph +with two lines. + + indented code + +> A block quote."##); +} + +#[test] +fn markdown_list_items_254() { + // https://spec.commonmark.org/0.30/#example-254 + test_identical_markdown_events!(r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn markdown_list_items_255() { + // https://spec.commonmark.org/0.30/#example-255 + test_identical_markdown_events!(r##"- one + + two"##,r##"- one + +two"##); +} + +#[test] +fn markdown_list_items_256() { + // https://spec.commonmark.org/0.30/#example-256 + test_identical_markdown_events!(r##"- one + + two"##); +} + +#[test] +fn markdown_list_items_257() { + // https://spec.commonmark.org/0.30/#example-257 + test!(r##" - one + + two"##,r##"- one + + + + two"##); +} + +#[test] +fn markdown_list_items_258() { + // https://spec.commonmark.org/0.30/#example-258 + test_identical_markdown_events!(r##" - one + + two"##,r##"- one + + two"##); +} + +#[test] +fn markdown_list_items_259() { + // https://spec.commonmark.org/0.30/#example-259 + test_identical_markdown_events!(r##" > > 1. one +>> +>> two"##,r##"> > 1. one +> > +> > two"##); +} + +#[test] +fn markdown_list_items_260() { + // https://spec.commonmark.org/0.30/#example-260 + test_identical_markdown_events!(r##">>- one +>> + > > two"##,r##"> > - one +> > +> > two"##); +} + +#[test] +fn markdown_list_items_261() { + // https://spec.commonmark.org/0.30/#example-261 + test_identical_markdown_events!(r##"-one + +2.two"##); +} + +#[test] +fn markdown_list_items_262() { + // https://spec.commonmark.org/0.30/#example-262 + test_identical_markdown_events!(r##"- foo + + + bar"##,r##"- foo + + + bar"##); +} + +#[test] +fn markdown_list_items_263() { + // https://spec.commonmark.org/0.30/#example-263 + test_identical_markdown_events!(r##"1. foo + + ``` + bar + ``` + + baz + + > bam"##,r##"1. foo + + ``` + bar + ``` + + baz + + > bam"##); +} + +#[test] +fn markdown_list_items_264() { + // https://spec.commonmark.org/0.30/#example-264 + test_identical_markdown_events!(r##"- Foo + + bar + + + baz"##); +} + +#[test] +fn markdown_list_items_265() { + // https://spec.commonmark.org/0.30/#example-265 + test_identical_markdown_events!(r##"123456789. ok"##); +} + +#[test] +fn markdown_list_items_266() { + // https://spec.commonmark.org/0.30/#example-266 + test_identical_markdown_events!(r##"1234567890. not ok"##); +} + +#[test] +fn markdown_list_items_267() { + // https://spec.commonmark.org/0.30/#example-267 + test_identical_markdown_events!(r##"0. ok"##); +} + +#[test] +fn markdown_list_items_268() { + // https://spec.commonmark.org/0.30/#example-268 + test_identical_markdown_events!(r##"003. ok"##); +} + +#[test] +fn markdown_list_items_269() { + // https://spec.commonmark.org/0.30/#example-269 + test_identical_markdown_events!(r##"-1. not ok"##); +} + +#[test] +fn markdown_list_items_270() { + // https://spec.commonmark.org/0.30/#example-270 + test_identical_markdown_events!(r##"- foo + + bar"##); +} + +#[test] +fn markdown_list_items_271() { + // https://spec.commonmark.org/0.30/#example-271 + test_identical_markdown_events!(r##" 10. foo + + bar"##,r##"10. foo + + bar"##); +} + +#[test] +fn markdown_list_items_272() { + // https://spec.commonmark.org/0.30/#example-272 + test_identical_markdown_events!(r##" indented code + +paragraph + + more code"##); +} + +#[test] +fn markdown_list_items_273() { + // https://spec.commonmark.org/0.30/#example-273 + test_identical_markdown_events!(r##"1. indented code + + paragraph + + more code"##); +} + +#[test] +fn markdown_list_items_274() { + // https://spec.commonmark.org/0.30/#example-274 + test_identical_markdown_events!(r##"1. indented code + + paragraph + + more code"##); +} + +#[test] +fn markdown_list_items_275() { + // https://spec.commonmark.org/0.30/#example-275 + test_identical_markdown_events!(r##" foo + +bar"##,r##"foo + +bar"##); +} + +#[test] +fn markdown_list_items_276() { + // https://spec.commonmark.org/0.30/#example-276 + test_identical_markdown_events!(r##"- foo + + bar"##,r##"- foo + +bar"##); +} + +#[test] +fn markdown_list_items_277() { + // https://spec.commonmark.org/0.30/#example-277 + test_identical_markdown_events!(r##"- foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn markdown_list_items_278() { + // https://spec.commonmark.org/0.30/#example-278 + test_identical_markdown_events!(r##"- + foo +- + ``` + bar + ``` +- + baz"##,r##"- foo +- ``` + bar + ``` +- baz"##); +} + +#[test] +fn markdown_list_items_279() { + // https://spec.commonmark.org/0.30/#example-279 + test_identical_markdown_events!("- \n foo",r##"- foo"##); +} + +#[test] +fn markdown_list_items_280() { + // https://spec.commonmark.org/0.30/#example-280 + test_identical_markdown_events!(r##"- + + foo"##,r##"- + +foo"##); +} + +#[test] +fn markdown_list_items_281() { + // https://spec.commonmark.org/0.30/#example-281 + test_identical_markdown_events!(r##"- foo +- +- bar"##); +} + +#[test] +fn markdown_list_items_282() { + // https://spec.commonmark.org/0.30/#example-282 + test_identical_markdown_events!("- foo\n- \n- bar",r##"- foo +- +- bar"##); +} + +#[test] +fn markdown_list_items_283() { + // https://spec.commonmark.org/0.30/#example-283 + test_identical_markdown_events!(r##"1. foo +2. +3. bar"##); +} + +#[test] +fn markdown_list_items_284() { + // https://spec.commonmark.org/0.30/#example-284 + test_identical_markdown_events!(r##"*"##); +} + +#[test] +fn markdown_list_items_285() { + // https://spec.commonmark.org/0.30/#example-285 + test_identical_markdown_events!(r##"foo +* + +foo +1."##); +} + +#[test] +fn markdown_list_items_286() { + // https://spec.commonmark.org/0.30/#example-286 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn markdown_list_items_287() { + // https://spec.commonmark.org/0.30/#example-287 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn markdown_list_items_288() { + // https://spec.commonmark.org/0.30/#example-288 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn markdown_list_items_289() { + // https://spec.commonmark.org/0.30/#example-289 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn markdown_list_items_290() { + // https://spec.commonmark.org/0.30/#example-290 + test_identical_markdown_events!(r##" 1. A paragraph +with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn markdown_list_items_291() { + // https://spec.commonmark.org/0.30/#example-291 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines."##,r##"1. A paragraph + with two lines."##); +} + +#[test] +fn markdown_list_items_292() { + // https://spec.commonmark.org/0.30/#example-292 + test_identical_markdown_events!(r##"> 1. > Blockquote +continued here."##,r##"> 1. > Blockquote +> > continued here."##); +} + +#[test] +fn markdown_list_items_293() { + // https://spec.commonmark.org/0.30/#example-293 + test_identical_markdown_events!(r##"> 1. > Blockquote +> continued here."##,r##"> 1. > Blockquote +> > continued here."##); +} + +#[test] +fn markdown_list_items_294() { + // https://spec.commonmark.org/0.30/#example-294 + test_identical_markdown_events!(r##"- foo + - bar + - baz + - boo"##); +} + +#[test] +fn markdown_list_items_295() { + // https://spec.commonmark.org/0.30/#example-295 + test_identical_markdown_events!(r##"- foo + - bar + - baz + - boo"##,r##"- foo +- bar +- baz +- boo"##); +} + +#[test] +fn markdown_list_items_296() { + // https://spec.commonmark.org/0.30/#example-296 + test_identical_markdown_events!(r##"10) foo + - bar"##); +} + +#[test] +fn markdown_list_items_297() { + // https://spec.commonmark.org/0.30/#example-297 + test_identical_markdown_events!(r##"10) foo + - bar"##,r##"10) foo +- bar"##); +} + +#[test] +fn markdown_list_items_298() { + // https://spec.commonmark.org/0.30/#example-298 + test_identical_markdown_events!(r##"- - foo"##); +} + +#[test] +fn markdown_list_items_299() { + // https://spec.commonmark.org/0.30/#example-299 + test_identical_markdown_events!(r##"1. - 2. foo"##); +} + +#[test] +fn markdown_list_items_300() { + // https://spec.commonmark.org/0.30/#example-300 + test_identical_markdown_events!(r##"- # Foo +- Bar + --- + baz"##); +} + +#[test] +fn markdown_lists_301() { + // https://spec.commonmark.org/0.30/#example-301 + test_identical_markdown_events!(r##"- foo +- bar ++ baz"##); +} + +#[test] +fn markdown_lists_302() { + // https://spec.commonmark.org/0.30/#example-302 + test_identical_markdown_events!(r##"1. foo +2. bar +3) baz"##); +} + +#[test] +fn markdown_lists_303() { + // https://spec.commonmark.org/0.30/#example-303 + test_identical_markdown_events!(r##"Foo +- bar +- baz"##); +} + +#[test] +fn markdown_lists_304() { + // https://spec.commonmark.org/0.30/#example-304 + test_identical_markdown_events!(r##"The number of windows in my house is +14. The number of doors is 6."##); +} + +#[test] +fn markdown_lists_305() { + // https://spec.commonmark.org/0.30/#example-305 + test_identical_markdown_events!(r##"The number of windows in my house is +1. The number of doors is 6."##,r##"The number of windows in my house is +1. The number of doors is 6."##); +} + +#[test] +fn markdown_lists_306() { + // https://spec.commonmark.org/0.30/#example-306 + test_identical_markdown_events!(r##"- foo + +- bar + + +- baz"##); +} + +#[test] +fn markdown_lists_307() { + // https://spec.commonmark.org/0.30/#example-307 + test_identical_markdown_events!(r##"- foo + - bar + - baz + + + bim"##); +} + +#[test] +fn markdown_lists_308() { + // https://spec.commonmark.org/0.30/#example-308 + test_identical_markdown_events!(r##"- foo +- bar + + + +- baz +- bim"##); +} + +#[test] +fn markdown_lists_309() { + // https://spec.commonmark.org/0.30/#example-309 + test_identical_markdown_events!(r##"- foo + + notcode + +- foo + + + + code"##,r##"- foo + + notcode + +- foo + + + + code"##); +} + +#[test] +fn markdown_lists_310() { + // https://spec.commonmark.org/0.30/#example-310 + test_identical_markdown_events!(r##"- a + - b + - c + - d + - e + - f +- g"##,r##"- a +- b +- c +- d +- e +- f +- g"##); +} + +#[test] +fn markdown_lists_311() { + // https://spec.commonmark.org/0.30/#example-311 + test_identical_markdown_events!(r##"1. a + + 2. b + + 3. c"##,r##"1. a + +2. b + +3. c"##); +} + +#[test] +fn markdown_lists_312() { + // https://spec.commonmark.org/0.30/#example-312 + test_identical_markdown_events!(r##"- a + - b + - c + - d + - e"##,r##"- a +- b +- c +- d + \- e"##); +} + +#[test] +fn markdown_lists_313() { + // https://spec.commonmark.org/0.30/#example-313 + test!(r##"1. a + + 2. b + + 3. c"##,r##"1. a + +2. b + + + + 3. c"##); +} + +#[test] +fn markdown_lists_314() { + // https://spec.commonmark.org/0.30/#example-314 + test_identical_markdown_events!(r##"- a +- b + +- c"##); +} + +#[test] +fn markdown_lists_315() { + // https://spec.commonmark.org/0.30/#example-315 + test_identical_markdown_events!(r##"* a +* + +* c"##); +} + +#[test] +fn markdown_lists_316() { + // https://spec.commonmark.org/0.30/#example-316 + test_identical_markdown_events!(r##"- a +- b + + c +- d"##); +} + +#[test] +fn markdown_lists_317() { + // https://spec.commonmark.org/0.30/#example-317 + test!(r##"- a +- b + + [ref]: /url +- d"##,r##"- a +- b + +[ref]: /url +- d"##); +} + +#[test] +fn markdown_lists_318() { + // https://spec.commonmark.org/0.30/#example-318 + test!(r##"- a +- ``` + b + + + ``` +- c"##,r##"- a +- ``` + b + ``` +- c"##); +} + +#[test] +fn markdown_lists_319() { + // https://spec.commonmark.org/0.30/#example-319 + test_identical_markdown_events!(r##"- a + - b + + c +- d"##); +} + +#[test] +fn markdown_lists_320() { + // https://spec.commonmark.org/0.30/#example-320 + test_identical_markdown_events!(r##"* a + > b + > +* c"##); +} + +#[test] +fn markdown_lists_321() { + // https://spec.commonmark.org/0.30/#example-321 + test_identical_markdown_events!(r##"- a + > b + ``` + c + ``` +- d"##); +} + +#[test] +fn markdown_lists_322() { + // https://spec.commonmark.org/0.30/#example-322 + test_identical_markdown_events!(r##"- a"##); +} + +#[test] +fn markdown_lists_323() { + // https://spec.commonmark.org/0.30/#example-323 + test_identical_markdown_events!(r##"- a + - b"##); +} + +#[test] +fn markdown_lists_324() { + // https://spec.commonmark.org/0.30/#example-324 + test_identical_markdown_events!(r##"1. ``` + foo + ``` + + bar"##); +} + +#[test] +fn markdown_lists_325() { + // https://spec.commonmark.org/0.30/#example-325 + test_identical_markdown_events!(r##"* foo + * bar + + baz"##); +} + +#[test] +fn markdown_lists_326() { + // https://spec.commonmark.org/0.30/#example-326 + test_identical_markdown_events!(r##"- a + - b + - c + +- d + - e + - f"##); +} + +#[test] +fn markdown_inlines_327() { + // https://spec.commonmark.org/0.30/#example-327 + test_identical_markdown_events!(r##"`hi`lo`"##); +} + +#[test] +fn markdown_code_spans_328() { + // https://spec.commonmark.org/0.30/#example-328 + test_identical_markdown_events!(r##"`foo`"##); +} + +#[test] +fn markdown_code_spans_329() { + // https://spec.commonmark.org/0.30/#example-329 + test_identical_markdown_events!(r##"`` foo ` bar ``"##); +} + +#[test] +fn markdown_code_spans_330() { + // https://spec.commonmark.org/0.30/#example-330 + test_identical_markdown_events!(r##"` `` `"##); +} + +#[test] +fn markdown_code_spans_331() { + // https://spec.commonmark.org/0.30/#example-331 + test_identical_markdown_events!(r##"` `` `"##); +} + +#[test] +fn markdown_code_spans_332() { + // https://spec.commonmark.org/0.30/#example-332 + test_identical_markdown_events!(r##"` a`"##); +} + +#[test] +fn markdown_code_spans_333() { + // https://spec.commonmark.org/0.30/#example-333 + test_identical_markdown_events!(r##"` b `"##); +} + +#[test] +fn markdown_code_spans_334() { + // https://spec.commonmark.org/0.30/#example-334 + test_identical_markdown_events!(r##"` ` +` `"##); +} + +#[test] +fn markdown_code_spans_335() { + // https://spec.commonmark.org/0.30/#example-335 + test_identical_markdown_events!("``\nfoo\nbar \nbaz\n``"); +} + +#[test] +fn markdown_code_spans_336() { + // https://spec.commonmark.org/0.30/#example-336 + test_identical_markdown_events!("``\nfoo \n``"); +} + +#[test] +fn markdown_code_spans_337() { + // https://spec.commonmark.org/0.30/#example-337 + test_identical_markdown_events!("`foo bar \nbaz`"); +} + +#[test] +fn markdown_code_spans_338() { + // https://spec.commonmark.org/0.30/#example-338 + test_identical_markdown_events!(r##"`foo\`bar`"##); +} + +#[test] +fn markdown_code_spans_339() { + // https://spec.commonmark.org/0.30/#example-339 + test_identical_markdown_events!(r##"``foo`bar``"##); +} + +#[test] +fn markdown_code_spans_340() { + // https://spec.commonmark.org/0.30/#example-340 + test_identical_markdown_events!(r##"` foo `` bar `"##); +} + +#[test] +fn markdown_code_spans_341() { + // https://spec.commonmark.org/0.30/#example-341 + test_identical_markdown_events!(r##"*foo`*`"##); +} + +#[test] +fn markdown_code_spans_342() { + // https://spec.commonmark.org/0.30/#example-342 + test_identical_markdown_events!(r##"[not a `link](/foo`)"##); +} + +#[test] +fn markdown_code_spans_343() { + // https://spec.commonmark.org/0.30/#example-343 + test_identical_markdown_events!(r##"`
`"##); +} + +#[test] +fn markdown_code_spans_344() { + // https://spec.commonmark.org/0.30/#example-344 + test_identical_markdown_events!(r##"`"##); +} + +#[test] +fn markdown_code_spans_345() { + // https://spec.commonmark.org/0.30/#example-345 + test_identical_markdown_events!(r##"``"##); +} + +#[test] +fn markdown_code_spans_346() { + // https://spec.commonmark.org/0.30/#example-346 + test_identical_markdown_events!(r##"`"##); +} + +#[test] +fn markdown_code_spans_347() { + // https://spec.commonmark.org/0.30/#example-347 + test_identical_markdown_events!(r##"```foo``"##); +} + +#[test] +fn markdown_code_spans_348() { + // https://spec.commonmark.org/0.30/#example-348 + test_identical_markdown_events!(r##"`foo"##); +} + +#[test] +fn markdown_code_spans_349() { + // https://spec.commonmark.org/0.30/#example-349 + test_identical_markdown_events!(r##"`foo``bar``"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_350() { + // https://spec.commonmark.org/0.30/#example-350 + test_identical_markdown_events!(r##"*foo bar*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_351() { + // https://spec.commonmark.org/0.30/#example-351 + test_identical_markdown_events!(r##"a * foo bar*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_352() { + // https://spec.commonmark.org/0.30/#example-352 + test_identical_markdown_events!(r##"a*"foo"*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_353() { + // https://spec.commonmark.org/0.30/#example-353 + test_identical_markdown_events!(r##"* a *"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_354() { + // https://spec.commonmark.org/0.30/#example-354 + test_identical_markdown_events!(r##"foo*bar*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_355() { + // https://spec.commonmark.org/0.30/#example-355 + test_identical_markdown_events!(r##"5*6*78"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_356() { + // https://spec.commonmark.org/0.30/#example-356 + test_identical_markdown_events!(r##"_foo bar_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_357() { + // https://spec.commonmark.org/0.30/#example-357 + test_identical_markdown_events!(r##"_ foo bar_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_358() { + // https://spec.commonmark.org/0.30/#example-358 + test_identical_markdown_events!(r##"a_"foo"_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_359() { + // https://spec.commonmark.org/0.30/#example-359 + test_identical_markdown_events!(r##"foo_bar_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_360() { + // https://spec.commonmark.org/0.30/#example-360 + test_identical_markdown_events!(r##"5_6_78"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_361() { + // https://spec.commonmark.org/0.30/#example-361 + test_identical_markdown_events!(r##"пристаням_стремятся_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_362() { + // https://spec.commonmark.org/0.30/#example-362 + test_identical_markdown_events!(r##"aa_"bb"_cc"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_363() { + // https://spec.commonmark.org/0.30/#example-363 + test_identical_markdown_events!(r##"foo-_(bar)_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_364() { + // https://spec.commonmark.org/0.30/#example-364 + test_identical_markdown_events!(r##"_foo*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_365() { + // https://spec.commonmark.org/0.30/#example-365 + test_identical_markdown_events!(r##"*foo bar *"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_366() { + // https://spec.commonmark.org/0.30/#example-366 + test_identical_markdown_events!(r##"*foo bar +*"##,r##"*foo bar +*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_367() { + // https://spec.commonmark.org/0.30/#example-367 + test_identical_markdown_events!(r##"*(*foo)"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_368() { + // https://spec.commonmark.org/0.30/#example-368 + test_identical_markdown_events!(r##"*(*foo*)*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_369() { + // https://spec.commonmark.org/0.30/#example-369 + test_identical_markdown_events!(r##"*foo*bar"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_370() { + // https://spec.commonmark.org/0.30/#example-370 + test_identical_markdown_events!(r##"_foo bar _"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_371() { + // https://spec.commonmark.org/0.30/#example-371 + test_identical_markdown_events!(r##"_(_foo)"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_372() { + // https://spec.commonmark.org/0.30/#example-372 + test_identical_markdown_events!(r##"_(_foo_)_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_373() { + // https://spec.commonmark.org/0.30/#example-373 + test_identical_markdown_events!(r##"_foo_bar"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_374() { + // https://spec.commonmark.org/0.30/#example-374 + test_identical_markdown_events!(r##"_пристаням_стремятся"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_375() { + // https://spec.commonmark.org/0.30/#example-375 + test_identical_markdown_events!(r##"_foo_bar_baz_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_376() { + // https://spec.commonmark.org/0.30/#example-376 + test_identical_markdown_events!(r##"_(bar)_."##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_377() { + // https://spec.commonmark.org/0.30/#example-377 + test_identical_markdown_events!(r##"**foo bar**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_378() { + // https://spec.commonmark.org/0.30/#example-378 + test_identical_markdown_events!(r##"** foo bar**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_379() { + // https://spec.commonmark.org/0.30/#example-379 + test_identical_markdown_events!(r##"a**"foo"**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_380() { + // https://spec.commonmark.org/0.30/#example-380 + test_identical_markdown_events!(r##"foo**bar**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_381() { + // https://spec.commonmark.org/0.30/#example-381 + test_identical_markdown_events!(r##"__foo bar__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_382() { + // https://spec.commonmark.org/0.30/#example-382 + test_identical_markdown_events!(r##"__ foo bar__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_383() { + // https://spec.commonmark.org/0.30/#example-383 + test_identical_markdown_events!(r##"__ +foo bar__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_384() { + // https://spec.commonmark.org/0.30/#example-384 + test_identical_markdown_events!(r##"a__"foo"__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_385() { + // https://spec.commonmark.org/0.30/#example-385 + test_identical_markdown_events!(r##"foo__bar__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_386() { + // https://spec.commonmark.org/0.30/#example-386 + test_identical_markdown_events!(r##"5__6__78"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_387() { + // https://spec.commonmark.org/0.30/#example-387 + test_identical_markdown_events!(r##"пристаням__стремятся__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_388() { + // https://spec.commonmark.org/0.30/#example-388 + test_identical_markdown_events!(r##"__foo, __bar__, baz__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_389() { + // https://spec.commonmark.org/0.30/#example-389 + test_identical_markdown_events!(r##"foo-__(bar)__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_390() { + // https://spec.commonmark.org/0.30/#example-390 + test_identical_markdown_events!(r##"**foo bar **"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_391() { + // https://spec.commonmark.org/0.30/#example-391 + test_identical_markdown_events!(r##"**(**foo)"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_392() { + // https://spec.commonmark.org/0.30/#example-392 + test_identical_markdown_events!(r##"*(**foo**)*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_393() { + // https://spec.commonmark.org/0.30/#example-393 + test_identical_markdown_events!(r##"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_394() { + // https://spec.commonmark.org/0.30/#example-394 + test_identical_markdown_events!(r##"**foo "*bar*" foo**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_395() { + // https://spec.commonmark.org/0.30/#example-395 + test_identical_markdown_events!(r##"**foo**bar"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_396() { + // https://spec.commonmark.org/0.30/#example-396 + test_identical_markdown_events!(r##"__foo bar __"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_397() { + // https://spec.commonmark.org/0.30/#example-397 + test_identical_markdown_events!(r##"__(__foo)"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_398() { + // https://spec.commonmark.org/0.30/#example-398 + test_identical_markdown_events!(r##"_(__foo__)_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_399() { + // https://spec.commonmark.org/0.30/#example-399 + test_identical_markdown_events!(r##"__foo__bar"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_400() { + // https://spec.commonmark.org/0.30/#example-400 + test_identical_markdown_events!(r##"__пристаням__стремятся"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_401() { + // https://spec.commonmark.org/0.30/#example-401 + test_identical_markdown_events!(r##"__foo__bar__baz__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_402() { + // https://spec.commonmark.org/0.30/#example-402 + test_identical_markdown_events!(r##"__(bar)__."##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_403() { + // https://spec.commonmark.org/0.30/#example-403 + test_identical_markdown_events!(r##"*foo [bar](/url)*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_404() { + // https://spec.commonmark.org/0.30/#example-404 + test_identical_markdown_events!(r##"*foo +bar*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_405() { + // https://spec.commonmark.org/0.30/#example-405 + test_identical_markdown_events!(r##"_foo __bar__ baz_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_406() { + // https://spec.commonmark.org/0.30/#example-406 + test_identical_markdown_events!(r##"_foo _bar_ baz_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_407() { + // https://spec.commonmark.org/0.30/#example-407 + test_identical_markdown_events!(r##"__foo_ bar_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_408() { + // https://spec.commonmark.org/0.30/#example-408 + test_identical_markdown_events!(r##"*foo *bar**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_409() { + // https://spec.commonmark.org/0.30/#example-409 + test_identical_markdown_events!(r##"*foo **bar** baz*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_410() { + // https://spec.commonmark.org/0.30/#example-410 + test_identical_markdown_events!(r##"*foo**bar**baz*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_411() { + // https://spec.commonmark.org/0.30/#example-411 + test_identical_markdown_events!(r##"*foo**bar*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_412() { + // https://spec.commonmark.org/0.30/#example-412 + test_identical_markdown_events!(r##"***foo** bar*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_413() { + // https://spec.commonmark.org/0.30/#example-413 + test_identical_markdown_events!(r##"*foo **bar***"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_414() { + // https://spec.commonmark.org/0.30/#example-414 + test_identical_markdown_events!(r##"*foo**bar***"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_415() { + // https://spec.commonmark.org/0.30/#example-415 + test_identical_markdown_events!(r##"foo***bar***baz"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_416() { + // https://spec.commonmark.org/0.30/#example-416 + test_identical_markdown_events!(r##"foo******bar*********baz"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_417() { + // https://spec.commonmark.org/0.30/#example-417 + test_identical_markdown_events!(r##"*foo **bar *baz* bim** bop*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_418() { + // https://spec.commonmark.org/0.30/#example-418 + test_identical_markdown_events!(r##"*foo [*bar*](/url)*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_419() { + // https://spec.commonmark.org/0.30/#example-419 + test_identical_markdown_events!(r##"** is not an empty emphasis"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_420() { + // https://spec.commonmark.org/0.30/#example-420 + test_identical_markdown_events!(r##"**** is not an empty strong emphasis"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_421() { + // https://spec.commonmark.org/0.30/#example-421 + test_identical_markdown_events!(r##"**foo [bar](/url)**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_422() { + // https://spec.commonmark.org/0.30/#example-422 + test_identical_markdown_events!(r##"**foo +bar**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_423() { + // https://spec.commonmark.org/0.30/#example-423 + test_identical_markdown_events!(r##"__foo _bar_ baz__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_424() { + // https://spec.commonmark.org/0.30/#example-424 + test_identical_markdown_events!(r##"__foo __bar__ baz__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_425() { + // https://spec.commonmark.org/0.30/#example-425 + test_identical_markdown_events!(r##"____foo__ bar__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_426() { + // https://spec.commonmark.org/0.30/#example-426 + test_identical_markdown_events!(r##"**foo **bar****"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_427() { + // https://spec.commonmark.org/0.30/#example-427 + test_identical_markdown_events!(r##"**foo *bar* baz**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_428() { + // https://spec.commonmark.org/0.30/#example-428 + test_identical_markdown_events!(r##"**foo*bar*baz**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_429() { + // https://spec.commonmark.org/0.30/#example-429 + test_identical_markdown_events!(r##"***foo* bar**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_430() { + // https://spec.commonmark.org/0.30/#example-430 + test_identical_markdown_events!(r##"**foo *bar***"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_431() { + // https://spec.commonmark.org/0.30/#example-431 + test_identical_markdown_events!(r##"**foo *bar **baz** +bim* bop**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_432() { + // https://spec.commonmark.org/0.30/#example-432 + test_identical_markdown_events!(r##"**foo [*bar*](/url)**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_433() { + // https://spec.commonmark.org/0.30/#example-433 + test_identical_markdown_events!(r##"__ is not an empty emphasis"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_434() { + // https://spec.commonmark.org/0.30/#example-434 + test_identical_markdown_events!(r##"____ is not an empty strong emphasis"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_435() { + // https://spec.commonmark.org/0.30/#example-435 + test_identical_markdown_events!(r##"foo ***"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_436() { + // https://spec.commonmark.org/0.30/#example-436 + test_identical_markdown_events!(r##"foo *\**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_437() { + // https://spec.commonmark.org/0.30/#example-437 + test_identical_markdown_events!(r##"foo *_*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_438() { + // https://spec.commonmark.org/0.30/#example-438 + test_identical_markdown_events!(r##"foo *****"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_439() { + // https://spec.commonmark.org/0.30/#example-439 + test_identical_markdown_events!(r##"foo **\***"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_440() { + // https://spec.commonmark.org/0.30/#example-440 + test_identical_markdown_events!(r##"foo **_**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_441() { + // https://spec.commonmark.org/0.30/#example-441 + test_identical_markdown_events!(r##"**foo*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_442() { + // https://spec.commonmark.org/0.30/#example-442 + test_identical_markdown_events!(r##"*foo**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_443() { + // https://spec.commonmark.org/0.30/#example-443 + test_identical_markdown_events!(r##"***foo**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_444() { + // https://spec.commonmark.org/0.30/#example-444 + test_identical_markdown_events!(r##"****foo*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_445() { + // https://spec.commonmark.org/0.30/#example-445 + test_identical_markdown_events!(r##"**foo***"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_446() { + // https://spec.commonmark.org/0.30/#example-446 + test_identical_markdown_events!(r##"*foo****"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_447() { + // https://spec.commonmark.org/0.30/#example-447 + test_identical_markdown_events!(r##"foo ___"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_448() { + // https://spec.commonmark.org/0.30/#example-448 + test_identical_markdown_events!(r##"foo _\__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_449() { + // https://spec.commonmark.org/0.30/#example-449 + test_identical_markdown_events!(r##"foo _*_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_450() { + // https://spec.commonmark.org/0.30/#example-450 + test_identical_markdown_events!(r##"foo _____"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_451() { + // https://spec.commonmark.org/0.30/#example-451 + test_identical_markdown_events!(r##"foo __\___"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_452() { + // https://spec.commonmark.org/0.30/#example-452 + test_identical_markdown_events!(r##"foo __*__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_453() { + // https://spec.commonmark.org/0.30/#example-453 + test_identical_markdown_events!(r##"__foo_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_454() { + // https://spec.commonmark.org/0.30/#example-454 + test_identical_markdown_events!(r##"_foo__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_455() { + // https://spec.commonmark.org/0.30/#example-455 + test_identical_markdown_events!(r##"___foo__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_456() { + // https://spec.commonmark.org/0.30/#example-456 + test_identical_markdown_events!(r##"____foo_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_457() { + // https://spec.commonmark.org/0.30/#example-457 + test_identical_markdown_events!(r##"__foo___"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_458() { + // https://spec.commonmark.org/0.30/#example-458 + test_identical_markdown_events!(r##"_foo____"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_459() { + // https://spec.commonmark.org/0.30/#example-459 + test_identical_markdown_events!(r##"**foo**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_460() { + // https://spec.commonmark.org/0.30/#example-460 + test_identical_markdown_events!(r##"*_foo_*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_461() { + // https://spec.commonmark.org/0.30/#example-461 + test_identical_markdown_events!(r##"__foo__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_462() { + // https://spec.commonmark.org/0.30/#example-462 + test_identical_markdown_events!(r##"_*foo*_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_463() { + // https://spec.commonmark.org/0.30/#example-463 + test_identical_markdown_events!(r##"****foo****"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_464() { + // https://spec.commonmark.org/0.30/#example-464 + test_identical_markdown_events!(r##"____foo____"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_465() { + // https://spec.commonmark.org/0.30/#example-465 + test_identical_markdown_events!(r##"******foo******"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_466() { + // https://spec.commonmark.org/0.30/#example-466 + test_identical_markdown_events!(r##"***foo***"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_467() { + // https://spec.commonmark.org/0.30/#example-467 + test_identical_markdown_events!(r##"_____foo_____"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_468() { + // https://spec.commonmark.org/0.30/#example-468 + test_identical_markdown_events!(r##"*foo _bar* baz_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_469() { + // https://spec.commonmark.org/0.30/#example-469 + test_identical_markdown_events!(r##"*foo __bar *baz bim__ bam*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_470() { + // https://spec.commonmark.org/0.30/#example-470 + test_identical_markdown_events!(r##"**foo **bar baz**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_471() { + // https://spec.commonmark.org/0.30/#example-471 + test_identical_markdown_events!(r##"*foo *bar baz*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_472() { + // https://spec.commonmark.org/0.30/#example-472 + test_identical_markdown_events!(r##"*[bar*](/url)"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_473() { + // https://spec.commonmark.org/0.30/#example-473 + test_identical_markdown_events!(r##"_foo [bar_](/url)"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_474() { + // https://spec.commonmark.org/0.30/#example-474 + test_identical_markdown_events!(r##"*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_475() { + // https://spec.commonmark.org/0.30/#example-475 + test_identical_markdown_events!(r##"**"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_476() { + // https://spec.commonmark.org/0.30/#example-476 + test_identical_markdown_events!(r##"__"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_477() { + // https://spec.commonmark.org/0.30/#example-477 + test_identical_markdown_events!(r##"*a `*`*"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_478() { + // https://spec.commonmark.org/0.30/#example-478 + test_identical_markdown_events!(r##"_a `_`_"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_479() { + // https://spec.commonmark.org/0.30/#example-479 + test_identical_markdown_events!(r##"**a"##); +} + +#[test] +fn markdown_emphasis_and_strong_emphasis_480() { + // https://spec.commonmark.org/0.30/#example-480 + test_identical_markdown_events!(r##"__a"##); +} + +#[test] +fn markdown_links_481() { + // https://spec.commonmark.org/0.30/#example-481 + test_identical_markdown_events!(r##"[link](/uri "title")"##); +} + +#[test] +fn markdown_links_482() { + // https://spec.commonmark.org/0.30/#example-482 + test_identical_markdown_events!(r##"[link](/uri)"##); +} + +#[test] +fn markdown_links_483() { + // https://spec.commonmark.org/0.30/#example-483 + test_identical_markdown_events!(r##"[](./target.md)"##); +} + +#[test] +fn markdown_links_484() { + // https://spec.commonmark.org/0.30/#example-484 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn markdown_links_485() { + // https://spec.commonmark.org/0.30/#example-485 + test_identical_markdown_events!(r##"[link](<>)"##,r##"[link]()"##); +} + +#[test] +fn markdown_links_486() { + // https://spec.commonmark.org/0.30/#example-486 + test_identical_markdown_events!(r##"[]()"##); +} + +#[test] +fn markdown_links_487() { + // https://spec.commonmark.org/0.30/#example-487 + test_identical_markdown_events!(r##"[link](/my uri)"##); +} + +#[test] +fn markdown_links_488() { + // https://spec.commonmark.org/0.30/#example-488 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn markdown_links_489() { + // https://spec.commonmark.org/0.30/#example-489 + test_identical_markdown_events!(r##"[link](foo +bar)"##); +} + +#[test] +fn markdown_links_490() { + // https://spec.commonmark.org/0.30/#example-490 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn markdown_links_491() { + // https://spec.commonmark.org/0.30/#example-491 + test_identical_markdown_events!(r##"[a]()"##); +} + +#[test] +fn markdown_links_492() { + // https://spec.commonmark.org/0.30/#example-492 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn markdown_links_493() { + // https://spec.commonmark.org/0.30/#example-493 + test_identical_markdown_events!(r##"[a]( +[a](c)"##); +} + +#[test] +fn markdown_links_494() { + // https://spec.commonmark.org/0.30/#example-494 + test_identical_markdown_events!(r##"[link](\(foo\))"##,r##"[link](\(foo\))"##); +} + +#[test] +fn markdown_links_495() { + // https://spec.commonmark.org/0.30/#example-495 + test_identical_markdown_events!(r##"[link](foo(and(bar)))"##); +} + +#[test] +fn markdown_links_496() { + // https://spec.commonmark.org/0.30/#example-496 + test_identical_markdown_events!(r##"[link](foo(and(bar))"##); +} + +#[test] +fn markdown_links_497() { + // https://spec.commonmark.org/0.30/#example-497 + test_identical_markdown_events!(r##"[link](foo\(and\(bar\))"##,r##"[link](foo\(and\(bar\))"##); +} + +#[test] +fn markdown_links_498() { + // https://spec.commonmark.org/0.30/#example-498 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn markdown_links_499() { + // https://spec.commonmark.org/0.30/#example-499 + test_identical_markdown_events!(r##"[link](foo\)\:)"##,r##"[link](foo\)\:)"##); +} + +#[test] +fn markdown_links_500() { + // https://spec.commonmark.org/0.30/#example-500 + test_identical_markdown_events!(r##"[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag)"##); +} + +#[test] +fn markdown_links_501() { + // https://spec.commonmark.org/0.30/#example-501 + test_identical_markdown_events!(r##"[link](foo\bar)"##); +} + +#[test] +fn markdown_links_502() { + // https://spec.commonmark.org/0.30/#example-502 + test_identical_markdown_events!(r##"[link](foo%20bä)"##,r##"[link](foo%20bä)"##); +} + +#[test] +fn markdown_links_503() { + // https://spec.commonmark.org/0.30/#example-503 + test_identical_markdown_events!(r##"[link]("title")"##); +} + +#[test] +fn markdown_links_504() { + // https://spec.commonmark.org/0.30/#example-504 + test_identical_markdown_events!(r##"[link](/url "title") +[link](/url 'title') +[link](/url (title))"##,r##"[link](/url "title") +[link](/url 'title') +[link](/url (title))"##); +} + +#[test] +fn markdown_links_505() { + // https://spec.commonmark.org/0.30/#example-505 + test_identical_markdown_events!(r##"[link](/url "title \""")"##); +} + +#[test] +fn markdown_links_506() { + // https://spec.commonmark.org/0.30/#example-506 + test!(r##"[link](/url "title")"##,r##"[link](/url "title")"##); +} + +#[test] +fn markdown_links_507() { + // https://spec.commonmark.org/0.30/#example-507 + test_identical_markdown_events!(r##"[link](/url "title "and" title")"##); +} + +#[test] +fn markdown_links_508() { + // https://spec.commonmark.org/0.30/#example-508 + test_identical_markdown_events!(r##"[link](/url 'title "and" title')"##); +} + +#[test] +fn markdown_links_509() { + // https://spec.commonmark.org/0.30/#example-509 + test_identical_markdown_events!(r##"[link]( /uri + "title" )"##,r##"[link](/uri "title")"##); +} + +#[test] +fn markdown_links_510() { + // https://spec.commonmark.org/0.30/#example-510 + test_identical_markdown_events!(r##"[link] (/uri)"##); +} + +#[test] +fn markdown_links_511() { + // https://spec.commonmark.org/0.30/#example-511 + test_identical_markdown_events!(r##"[link [foo [bar]]](/uri)"##); +} + +#[test] +fn markdown_links_512() { + // https://spec.commonmark.org/0.30/#example-512 + test_identical_markdown_events!(r##"[link] bar](/uri)"##); +} + +#[test] +fn markdown_links_513() { + // https://spec.commonmark.org/0.30/#example-513 + test_identical_markdown_events!(r##"[link [bar](/uri)"##); +} + +#[test] +fn markdown_links_514() { + // https://spec.commonmark.org/0.30/#example-514 + test_identical_markdown_events!(r##"[link \[bar](/uri)"##); +} + +#[test] +fn markdown_links_515() { + // https://spec.commonmark.org/0.30/#example-515 + test_identical_markdown_events!(r##"[link *foo **bar** `#`*](/uri)"##); +} + +#[test] +fn markdown_links_516() { + // https://spec.commonmark.org/0.30/#example-516 + test_identical_markdown_events!(r##"[![moon](moon.jpg)](/uri)"##); +} + +#[test] +fn markdown_links_517() { + // https://spec.commonmark.org/0.30/#example-517 + test_identical_markdown_events!(r##"[foo [bar](/uri)](/uri)"##); +} + +#[test] +fn markdown_links_518() { + // https://spec.commonmark.org/0.30/#example-518 + test_identical_markdown_events!(r##"[foo *[bar [baz](/uri)](/uri)*](/uri)"##); +} + +#[test] +fn markdown_links_519() { + // https://spec.commonmark.org/0.30/#example-519 + test_identical_markdown_events!(r##"![[[foo](uri1)](uri2)](uri3)"##); +} + +#[test] +fn markdown_links_520() { + // https://spec.commonmark.org/0.30/#example-520 + test_identical_markdown_events!(r##"*[foo*](/uri)"##); +} + +#[test] +fn markdown_links_521() { + // https://spec.commonmark.org/0.30/#example-521 + test_identical_markdown_events!(r##"[foo *bar](baz*)"##); +} + +#[test] +fn markdown_links_522() { + // https://spec.commonmark.org/0.30/#example-522 + test_identical_markdown_events!(r##"*foo [bar* baz]"##); +} + +#[test] +fn markdown_links_523() { + // https://spec.commonmark.org/0.30/#example-523 + test_identical_markdown_events!(r##"[foo "##); +} + +#[test] +fn markdown_links_524() { + // https://spec.commonmark.org/0.30/#example-524 + test_identical_markdown_events!(r##"[foo`](/uri)`"##); +} + +#[test] +fn markdown_links_525() { + // https://spec.commonmark.org/0.30/#example-525 + test_identical_markdown_events!(r##"[foo"##); +} + +#[test] +fn markdown_links_526() { + // https://spec.commonmark.org/0.30/#example-526 + test_identical_markdown_events!(r##"[foo][bar] + +[bar]: /url "title""##); +} + +#[test] +fn markdown_links_527() { + // https://spec.commonmark.org/0.30/#example-527 + test_identical_markdown_events!(r##"[link [foo [bar]]][ref] + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_528() { + // https://spec.commonmark.org/0.30/#example-528 + test_identical_markdown_events!(r##"[link \[bar][ref] + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_529() { + // https://spec.commonmark.org/0.30/#example-529 + test_identical_markdown_events!(r##"[link *foo **bar** `#`*][ref] + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_530() { + // https://spec.commonmark.org/0.30/#example-530 + test_identical_markdown_events!(r##"[![moon](moon.jpg)][ref] + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_531() { + // https://spec.commonmark.org/0.30/#example-531 + test_identical_markdown_events!(r##"[foo [bar](/uri)][ref] + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_532() { + // https://spec.commonmark.org/0.30/#example-532 + test_identical_markdown_events!(r##"[foo *bar [baz][ref]*][ref] + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_533() { + // https://spec.commonmark.org/0.30/#example-533 + test_identical_markdown_events!(r##"*[foo*][ref] + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_534() { + // https://spec.commonmark.org/0.30/#example-534 + test_identical_markdown_events!(r##"[foo *bar][ref]* + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_535() { + // https://spec.commonmark.org/0.30/#example-535 + test_identical_markdown_events!(r##"[foo + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_536() { + // https://spec.commonmark.org/0.30/#example-536 + test_identical_markdown_events!(r##"[foo`][ref]` + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_537() { + // https://spec.commonmark.org/0.30/#example-537 + test_identical_markdown_events!(r##"[foo + +[ref]: /uri"##); +} + +#[test] +fn markdown_links_538() { + // https://spec.commonmark.org/0.30/#example-538 + test_identical_markdown_events!(r##"[foo][BaR] + +[bar]: /url "title""##,r##"[foo][BaR] + +[bar]: /url "title""##); +} + +#[test] +fn markdown_links_539() { + // https://spec.commonmark.org/0.30/#example-539 + test_identical_markdown_events!(r##"[ẞ] + +[SS]: /url"##); +} + +#[test] +fn markdown_links_540() { + // https://spec.commonmark.org/0.30/#example-540 + test_identical_markdown_events!(r##"[Foo + bar]: /url + +[Baz][Foo bar]"##,r##"[Foo bar]: /url + +[Baz][Foo bar]"##); +} + +#[test] +fn markdown_links_541() { + // https://spec.commonmark.org/0.30/#example-541 + test_identical_markdown_events!(r##"[foo] [bar] + +[bar]: /url "title""##); +} + +#[test] +fn markdown_links_542() { + // https://spec.commonmark.org/0.30/#example-542 + test_identical_markdown_events!(r##"[foo] +[bar] + +[bar]: /url "title""##); +} + +#[test] +fn markdown_links_543() { + // https://spec.commonmark.org/0.30/#example-543 + test!(r##"[foo]: /url1 + +[foo]: /url2 + +[bar][foo]"##,r##"[foo]: /url1 + + + +[bar][foo]"##); +} + +#[test] +fn markdown_links_544() { + // https://spec.commonmark.org/0.30/#example-544 + test_identical_markdown_events!(r##"[bar][foo\!] + +[foo!]: /url"##); +} + +#[test] +fn markdown_links_545() { + // https://spec.commonmark.org/0.30/#example-545 + test_identical_markdown_events!(r##"[foo][ref[] + +[ref[]: /uri"##); +} + +#[test] +fn markdown_links_546() { + // https://spec.commonmark.org/0.30/#example-546 + test_identical_markdown_events!(r##"[foo][ref[bar]] + +[ref[bar]]: /uri"##); +} + +#[test] +fn markdown_links_547() { + // https://spec.commonmark.org/0.30/#example-547 + test_identical_markdown_events!(r##"[[[foo]]] + +[[[foo]]]: /url"##); +} + +#[test] +fn markdown_links_548() { + // https://spec.commonmark.org/0.30/#example-548 + test_identical_markdown_events!(r##"[foo][ref\[] + +[ref\[]: /uri"##); +} + +#[test] +fn markdown_links_549() { + // https://spec.commonmark.org/0.30/#example-549 + test_identical_markdown_events!(r##"[bar\\]: /uri + +[bar\\]"##,r##"[bar\\]: /uri + +[bar\\]"##); +} + +#[test] +fn markdown_links_550() { + // https://spec.commonmark.org/0.30/#example-550 + test_identical_markdown_events!(r##"[] + +[]: /uri"##); +} + +#[test] +fn markdown_links_551() { + // https://spec.commonmark.org/0.30/#example-551 + test_identical_markdown_events!(r##"[ + ] + +[ + ]: /uri"##,r##"[ +] + +[ +]: /uri"##); +} + +#[test] +fn markdown_links_552() { + // https://spec.commonmark.org/0.30/#example-552 + test_identical_markdown_events!(r##"[foo][] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_links_553() { + // https://spec.commonmark.org/0.30/#example-553 + test_identical_markdown_events!(r##"[*foo* bar][] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn markdown_links_554() { + // https://spec.commonmark.org/0.30/#example-554 + test_identical_markdown_events!(r##"[Foo][] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_links_555() { + // https://spec.commonmark.org/0.30/#example-555 + test_identical_markdown_events!("[foo] \n[]\n\n[foo]: /url \"title\""); +} + +#[test] +fn markdown_links_556() { + // https://spec.commonmark.org/0.30/#example-556 + test_identical_markdown_events!(r##"[foo] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_links_557() { + // https://spec.commonmark.org/0.30/#example-557 + test_identical_markdown_events!(r##"[*foo* bar] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn markdown_links_558() { + // https://spec.commonmark.org/0.30/#example-558 + test_identical_markdown_events!(r##"[[*foo* bar]] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn markdown_links_559() { + // https://spec.commonmark.org/0.30/#example-559 + test_identical_markdown_events!(r##"[[bar [foo] + +[foo]: /url"##); +} + +#[test] +fn markdown_links_560() { + // https://spec.commonmark.org/0.30/#example-560 + test_identical_markdown_events!(r##"[Foo] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_links_561() { + // https://spec.commonmark.org/0.30/#example-561 + test_identical_markdown_events!(r##"[foo] bar + +[foo]: /url"##); +} + +#[test] +fn markdown_links_562() { + // https://spec.commonmark.org/0.30/#example-562 + test_identical_markdown_events!(r##"\[foo] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_links_563() { + // https://spec.commonmark.org/0.30/#example-563 + test_identical_markdown_events!(r##"[foo*]: /url + +*[foo*]"##,r##"[foo*]: /url + +*[foo*]"##); +} + +#[test] +fn markdown_links_564() { + // https://spec.commonmark.org/0.30/#example-564 + test_identical_markdown_events!(r##"[foo][bar] + +[foo]: /url1 +[bar]: /url2"##); +} + +#[test] +fn markdown_links_565() { + // https://spec.commonmark.org/0.30/#example-565 + test_identical_markdown_events!(r##"[foo][] + +[foo]: /url1"##); +} + +#[test] +fn markdown_links_566() { + // https://spec.commonmark.org/0.30/#example-566 + test_identical_markdown_events!(r##"[foo]() + +[foo]: /url1"##); +} + +#[test] +fn markdown_links_567() { + // https://spec.commonmark.org/0.30/#example-567 + test_identical_markdown_events!(r##"[foo](not a link) + +[foo]: /url1"##); +} + +#[test] +fn markdown_links_568() { + // https://spec.commonmark.org/0.30/#example-568 + test_identical_markdown_events!(r##"[foo][bar][baz] + +[baz]: /url"##); +} + +#[test] +fn markdown_links_569() { + // https://spec.commonmark.org/0.30/#example-569 + test_identical_markdown_events!(r##"[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2"##); +} + +#[test] +fn markdown_links_570() { + // https://spec.commonmark.org/0.30/#example-570 + test_identical_markdown_events!(r##"[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2"##); +} + +#[test] +fn markdown_images_571() { + // https://spec.commonmark.org/0.30/#example-571 + test_identical_markdown_events!(r##"![foo](/url "title")"##); +} + +#[test] +fn markdown_images_572() { + // https://spec.commonmark.org/0.30/#example-572 + test_identical_markdown_events!(r##"![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks""##); +} + +#[test] +fn markdown_images_573() { + // https://spec.commonmark.org/0.30/#example-573 + test_identical_markdown_events!(r##"![foo ![bar](/url)](/url2)"##); +} + +#[test] +fn markdown_images_574() { + // https://spec.commonmark.org/0.30/#example-574 + test_identical_markdown_events!(r##"![foo [bar](/url)](/url2)"##); +} + +#[test] +fn markdown_images_575() { + // https://spec.commonmark.org/0.30/#example-575 + test_identical_markdown_events!(r##"![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks""##); +} + +#[test] +fn markdown_images_576() { + // https://spec.commonmark.org/0.30/#example-576 + test_identical_markdown_events!(r##"![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks""##,r##"![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks""##); +} + +#[test] +fn markdown_images_577() { + // https://spec.commonmark.org/0.30/#example-577 + test_identical_markdown_events!(r##"![foo](train.jpg)"##); +} + +#[test] +fn markdown_images_578() { + // https://spec.commonmark.org/0.30/#example-578 + test_identical_markdown_events!(r##"My ![foo bar](/path/to/train.jpg "title" )"##,r##"My ![foo bar](/path/to/train.jpg "title")"##); +} + +#[test] +fn markdown_images_579() { + // https://spec.commonmark.org/0.30/#example-579 + test_identical_markdown_events!(r##"![foo]()"##,r##"![foo](url)"##); +} + +#[test] +fn markdown_images_580() { + // https://spec.commonmark.org/0.30/#example-580 + test_identical_markdown_events!(r##"![](/url)"##); +} + +#[test] +fn markdown_images_581() { + // https://spec.commonmark.org/0.30/#example-581 + test_identical_markdown_events!(r##"![foo][bar] + +[bar]: /url"##); +} + +#[test] +fn markdown_images_582() { + // https://spec.commonmark.org/0.30/#example-582 + test_identical_markdown_events!(r##"![foo][bar] + +[BAR]: /url"##,r##"![foo][bar] + +[BAR]: /url"##); +} + +#[test] +fn markdown_images_583() { + // https://spec.commonmark.org/0.30/#example-583 + test_identical_markdown_events!(r##"![foo][] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_images_584() { + // https://spec.commonmark.org/0.30/#example-584 + test_identical_markdown_events!(r##"![*foo* bar][] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn markdown_images_585() { + // https://spec.commonmark.org/0.30/#example-585 + test_identical_markdown_events!(r##"![Foo][] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_images_586() { + // https://spec.commonmark.org/0.30/#example-586 + test_identical_markdown_events!("![foo] \n[]\n\n[foo]: /url \"title\""); +} + +#[test] +fn markdown_images_587() { + // https://spec.commonmark.org/0.30/#example-587 + test_identical_markdown_events!(r##"![foo] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_images_588() { + // https://spec.commonmark.org/0.30/#example-588 + test_identical_markdown_events!(r##"![*foo* bar] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn markdown_images_589() { + // https://spec.commonmark.org/0.30/#example-589 + test_identical_markdown_events!(r##"![[foo]] + +[[foo]]: /url "title""##); +} + +#[test] +fn markdown_images_590() { + // https://spec.commonmark.org/0.30/#example-590 + test_identical_markdown_events!(r##"![Foo] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_images_591() { + // https://spec.commonmark.org/0.30/#example-591 + test_identical_markdown_events!(r##"!\[foo] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_images_592() { + // https://spec.commonmark.org/0.30/#example-592 + test_identical_markdown_events!(r##"\![foo] + +[foo]: /url "title""##); +} + +#[test] +fn markdown_autolinks_593() { + // https://spec.commonmark.org/0.30/#example-593 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_594() { + // https://spec.commonmark.org/0.30/#example-594 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_595() { + // https://spec.commonmark.org/0.30/#example-595 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_596() { + // https://spec.commonmark.org/0.30/#example-596 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_597() { + // https://spec.commonmark.org/0.30/#example-597 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_598() { + // https://spec.commonmark.org/0.30/#example-598 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_599() { + // https://spec.commonmark.org/0.30/#example-599 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_600() { + // https://spec.commonmark.org/0.30/#example-600 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_601() { + // https://spec.commonmark.org/0.30/#example-601 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_602() { + // https://spec.commonmark.org/0.30/#example-602 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_603() { + // https://spec.commonmark.org/0.30/#example-603 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_604() { + // https://spec.commonmark.org/0.30/#example-604 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_605() { + // https://spec.commonmark.org/0.30/#example-605 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_606() { + // https://spec.commonmark.org/0.30/#example-606 + test_identical_markdown_events!(r##"<>"##); +} + +#[test] +fn markdown_autolinks_607() { + // https://spec.commonmark.org/0.30/#example-607 + test_identical_markdown_events!(r##"< http://foo.bar >"##); +} + +#[test] +fn markdown_autolinks_608() { + // https://spec.commonmark.org/0.30/#example-608 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_609() { + // https://spec.commonmark.org/0.30/#example-609 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_autolinks_610() { + // https://spec.commonmark.org/0.30/#example-610 + test_identical_markdown_events!(r##"http://example.com"##); +} + +#[test] +fn markdown_autolinks_611() { + // https://spec.commonmark.org/0.30/#example-611 + test_identical_markdown_events!(r##"foo@bar.example.com"##); +} + +#[test] +fn markdown_raw_html_612() { + // https://spec.commonmark.org/0.30/#example-612 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_613() { + // https://spec.commonmark.org/0.30/#example-613 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_614() { + // https://spec.commonmark.org/0.30/#example-614 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_615() { + // https://spec.commonmark.org/0.30/#example-615 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_616() { + // https://spec.commonmark.org/0.30/#example-616 + test_identical_markdown_events!(r##"Foo "##); +} + +#[test] +fn markdown_raw_html_617() { + // https://spec.commonmark.org/0.30/#example-617 + test_identical_markdown_events!(r##"<33> <__>"##); +} + +#[test] +fn markdown_raw_html_618() { + // https://spec.commonmark.org/0.30/#example-618 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_619() { + // https://spec.commonmark.org/0.30/#example-619 + test_identical_markdown_events!(r##"< +foo> +"##); +} + +#[test] +fn markdown_raw_html_621() { + // https://spec.commonmark.org/0.30/#example-621 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_622() { + // https://spec.commonmark.org/0.30/#example-622 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_623() { + // https://spec.commonmark.org/0.30/#example-623 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_raw_html_624() { + // https://spec.commonmark.org/0.30/#example-624 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn markdown_raw_html_625() { + // https://spec.commonmark.org/0.30/#example-625 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn markdown_raw_html_626() { + // https://spec.commonmark.org/0.30/#example-626 + test_identical_markdown_events!(r##"foo foo --> + +foo "##); +} + +#[test] +fn markdown_raw_html_627() { + // https://spec.commonmark.org/0.30/#example-627 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn markdown_raw_html_628() { + // https://spec.commonmark.org/0.30/#example-628 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn markdown_raw_html_629() { + // https://spec.commonmark.org/0.30/#example-629 + test_identical_markdown_events!(r##"foo &<]]>"##); +} + +#[test] +fn markdown_raw_html_630() { + // https://spec.commonmark.org/0.30/#example-630 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn markdown_raw_html_631() { + // https://spec.commonmark.org/0.30/#example-631 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn markdown_raw_html_632() { + // https://spec.commonmark.org/0.30/#example-632 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_hard_line_breaks_633() { + // https://spec.commonmark.org/0.30/#example-633 + test_identical_markdown_events!("foo \nbaz"); +} + +#[test] +fn markdown_hard_line_breaks_634() { + // https://spec.commonmark.org/0.30/#example-634 + test_identical_markdown_events!(r##"foo\ +baz"##); +} + +#[test] +fn markdown_hard_line_breaks_635() { + // https://spec.commonmark.org/0.30/#example-635 + test_identical_markdown_events!("foo \nbaz"); +} + +#[test] +fn markdown_hard_line_breaks_636() { + // https://spec.commonmark.org/0.30/#example-636 + test_identical_markdown_events!("foo \n bar","foo \nbar"); +} + +#[test] +fn markdown_hard_line_breaks_637() { + // https://spec.commonmark.org/0.30/#example-637 + test_identical_markdown_events!(r##"foo\ + bar"##,r##"foo\ +bar"##); +} + +#[test] +fn markdown_hard_line_breaks_638() { + // https://spec.commonmark.org/0.30/#example-638 + test_identical_markdown_events!("*foo \nbar*"); +} + +#[test] +fn markdown_hard_line_breaks_639() { + // https://spec.commonmark.org/0.30/#example-639 + test_identical_markdown_events!(r##"*foo\ +bar*"##); +} + +#[test] +fn markdown_hard_line_breaks_640() { + // https://spec.commonmark.org/0.30/#example-640 + test_identical_markdown_events!("`code \nspan`"); +} + +#[test] +fn markdown_hard_line_breaks_641() { + // https://spec.commonmark.org/0.30/#example-641 + test_identical_markdown_events!(r##"`code\ +span`"##); +} + +#[test] +fn markdown_hard_line_breaks_642() { + // https://spec.commonmark.org/0.30/#example-642 + test_identical_markdown_events!(""); +} + +#[test] +fn markdown_hard_line_breaks_643() { + // https://spec.commonmark.org/0.30/#example-643 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn markdown_hard_line_breaks_644() { + // https://spec.commonmark.org/0.30/#example-644 + test_identical_markdown_events!(r##"foo\"##); +} + +#[test] +fn markdown_hard_line_breaks_645() { + // https://spec.commonmark.org/0.30/#example-645 + test_identical_markdown_events!("foo "); +} + +#[test] +fn markdown_hard_line_breaks_646() { + // https://spec.commonmark.org/0.30/#example-646 + test_identical_markdown_events!(r##"### foo\"##); +} + +#[test] +fn markdown_hard_line_breaks_647() { + // https://spec.commonmark.org/0.30/#example-647 + test_identical_markdown_events!("### foo ",r##"### foo"##); +} + +#[test] +fn markdown_soft_line_breaks_648() { + // https://spec.commonmark.org/0.30/#example-648 + test_identical_markdown_events!(r##"foo +baz"##); +} + +#[test] +fn markdown_soft_line_breaks_649() { + // https://spec.commonmark.org/0.30/#example-649 + test_identical_markdown_events!("foo \n baz","foo \nbaz"); +} + +#[test] +fn markdown_textual_content_650() { + // https://spec.commonmark.org/0.30/#example-650 + test_identical_markdown_events!(r##"hello $.;'there"##); +} + +#[test] +fn markdown_textual_content_651() { + // https://spec.commonmark.org/0.30/#example-651 + test_identical_markdown_events!(r##"Foo χρῆν"##); +} + +#[test] +fn markdown_textual_content_652() { + // https://spec.commonmark.org/0.30/#example-652 + test_identical_markdown_events!(r##"Multiple spaces"##); +} diff --git a/markdown/tests/gfm_spec.rs b/markdown/tests/gfm_spec.rs new file mode 100644 index 00000000000..c0589950ccc --- /dev/null +++ b/markdown/tests/gfm_spec.rs @@ -0,0 +1,5218 @@ +// @generated +// generated running `cargo build -F gen-tests` +// test macros are defined in tests/common/mod.rs +mod common; + +#[test] +fn gfm_markdown_tabs_1() { + // https://github.github.com/gfm/#example-1 + test_identical_markdown_events!(r##" foo baz bim"##,r##" foo baz bim"##); +} + +#[test] +fn gfm_markdown_tabs_2() { + // https://github.github.com/gfm/#example-2 + test_identical_markdown_events!(r##" foo baz bim"##,r##" foo baz bim"##); +} + +#[test] +fn gfm_markdown_tabs_3() { + // https://github.github.com/gfm/#example-3 + test_identical_markdown_events!(r##" a a + ὐ a"##); +} + +#[test] +fn gfm_markdown_tabs_4() { + // https://github.github.com/gfm/#example-4 + test_identical_markdown_events!(r##" - foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn gfm_markdown_tabs_5() { + // https://github.github.com/gfm/#example-5 + test_identical_markdown_events!(r##"- foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn gfm_markdown_tabs_6() { + // https://github.github.com/gfm/#example-6 + test_identical_markdown_events!(r##"> foo"##,r##"> foo"##); +} + +#[test] +fn gfm_markdown_tabs_7() { + // https://github.github.com/gfm/#example-7 + test_identical_markdown_events!(r##"- foo"##,r##"- foo"##); +} + +#[test] +fn gfm_markdown_tabs_8() { + // https://github.github.com/gfm/#example-8 + test_identical_markdown_events!(r##" foo + bar"##,r##" foo + bar"##); +} + +#[test] +fn gfm_markdown_tabs_9() { + // https://github.github.com/gfm/#example-9 + test_identical_markdown_events!(r##" - foo + - bar + - baz"##,r##"- foo + - bar + - baz"##); +} + +#[test] +fn gfm_markdown_tabs_10() { + // https://github.github.com/gfm/#example-10 + test_identical_markdown_events!(r##"# Foo"##,r##"# Foo"##); +} + +#[test] +fn gfm_markdown_tabs_11() { + // https://github.github.com/gfm/#example-11 + test_identical_markdown_events!("*\t*\t*\t"); +} + +#[test] +fn gfm_markdown_precedence_12() { + // https://github.github.com/gfm/#example-12 + test_identical_markdown_events!(r##"- `one +- two`"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_13() { + // https://github.github.com/gfm/#example-13 + test_identical_markdown_events!(r##"*** +--- +___"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_14() { + // https://github.github.com/gfm/#example-14 + test_identical_markdown_events!(r##"+++"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_15() { + // https://github.github.com/gfm/#example-15 + test_identical_markdown_events!(r##"==="##); +} + +#[test] +fn gfm_markdown_thematic_breaks_16() { + // https://github.github.com/gfm/#example-16 + test_identical_markdown_events!(r##"-- +** +__"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_17() { + // https://github.github.com/gfm/#example-17 + test_identical_markdown_events!(r##" *** + *** + ***"##,r##"*** +*** +***"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_18() { + // https://github.github.com/gfm/#example-18 + test_identical_markdown_events!(r##" ***"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_19() { + // https://github.github.com/gfm/#example-19 + test!(r##"Foo + ***"##,r##"Foo +\***"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_20() { + // https://github.github.com/gfm/#example-20 + test_identical_markdown_events!(r##"_____________________________________"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_21() { + // https://github.github.com/gfm/#example-21 + test_identical_markdown_events!(r##" - - -"##,r##"- - -"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_22() { + // https://github.github.com/gfm/#example-22 + test_identical_markdown_events!(r##" ** * ** * ** * **"##,r##"** * ** * ** * **"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_23() { + // https://github.github.com/gfm/#example-23 + test_identical_markdown_events!(r##"- - - -"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_24() { + // https://github.github.com/gfm/#example-24 + test_identical_markdown_events!("- - - - "); +} + +#[test] +fn gfm_markdown_thematic_breaks_25() { + // https://github.github.com/gfm/#example-25 + test_identical_markdown_events!(r##"_ _ _ _ a + +a------ + +---a---"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_26() { + // https://github.github.com/gfm/#example-26 + test_identical_markdown_events!(r##" *-*"##,r##"*-*"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_27() { + // https://github.github.com/gfm/#example-27 + test_identical_markdown_events!(r##"- foo +*** +- bar"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_28() { + // https://github.github.com/gfm/#example-28 + test_identical_markdown_events!(r##"Foo +*** +bar"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_29() { + // https://github.github.com/gfm/#example-29 + test_identical_markdown_events!(r##"Foo +--- +bar"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_30() { + // https://github.github.com/gfm/#example-30 + test_identical_markdown_events!(r##"* Foo +* * * +* Bar"##); +} + +#[test] +fn gfm_markdown_thematic_breaks_31() { + // https://github.github.com/gfm/#example-31 + test_identical_markdown_events!(r##"- Foo +- * * *"##); +} + +#[test] +fn gfm_markdown_atx_headings_32() { + // https://github.github.com/gfm/#example-32 + test_identical_markdown_events!(r##"# foo +## foo +### foo +#### foo +##### foo +###### foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_33() { + // https://github.github.com/gfm/#example-33 + test_identical_markdown_events!(r##"####### foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_34() { + // https://github.github.com/gfm/#example-34 + test_identical_markdown_events!(r##"#5 bolt + +#hashtag"##); +} + +#[test] +fn gfm_markdown_atx_headings_35() { + // https://github.github.com/gfm/#example-35 + test_identical_markdown_events!(r##"\## foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_36() { + // https://github.github.com/gfm/#example-36 + test_identical_markdown_events!(r##"# foo *bar* \*baz\*"##); +} + +#[test] +fn gfm_markdown_atx_headings_37() { + // https://github.github.com/gfm/#example-37 + test_identical_markdown_events!("# foo ",r##"# foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_38() { + // https://github.github.com/gfm/#example-38 + test_identical_markdown_events!(r##" ### foo + ## foo + # foo"##,r##"### foo +## foo +# foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_39() { + // https://github.github.com/gfm/#example-39 + test_identical_markdown_events!(r##" # foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_40() { + // https://github.github.com/gfm/#example-40 + test_identical_markdown_events!(r##"foo + # bar"##,r##"foo +\# bar"##); +} + +#[test] +fn gfm_markdown_atx_headings_41() { + // https://github.github.com/gfm/#example-41 + test_identical_markdown_events!(r##"## foo ## + ### bar ###"##,r##"## foo +### bar"##); +} + +#[test] +fn gfm_markdown_atx_headings_42() { + // https://github.github.com/gfm/#example-42 + test_identical_markdown_events!(r##"# foo ################################## +##### foo ##"##,r##"# foo +##### foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_43() { + // https://github.github.com/gfm/#example-43 + test_identical_markdown_events!("### foo ### ",r##"### foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_44() { + // https://github.github.com/gfm/#example-44 + test_identical_markdown_events!(r##"### foo ### b"##); +} + +#[test] +fn gfm_markdown_atx_headings_45() { + // https://github.github.com/gfm/#example-45 + test_identical_markdown_events!(r##"# foo#"##); +} + +#[test] +fn gfm_markdown_atx_headings_46() { + // https://github.github.com/gfm/#example-46 + test_identical_markdown_events!(r##"### foo \### +## foo #\## +# foo \#"##); +} + +#[test] +fn gfm_markdown_atx_headings_47() { + // https://github.github.com/gfm/#example-47 + test_identical_markdown_events!(r##"**** +## foo +****"##); +} + +#[test] +fn gfm_markdown_atx_headings_48() { + // https://github.github.com/gfm/#example-48 + test_identical_markdown_events!(r##"Foo bar +# baz +Bar foo"##); +} + +#[test] +fn gfm_markdown_atx_headings_49() { + // https://github.github.com/gfm/#example-49 + test_identical_markdown_events!("## \n#\n### ###",r##"## +# +###"##); +} + +#[test] +fn gfm_markdown_setext_headings_50() { + // https://github.github.com/gfm/#example-50 + test_identical_markdown_events!(r##"Foo *bar* +========= + +Foo *bar* +---------"##); +} + +#[test] +fn gfm_markdown_setext_headings_51() { + // https://github.github.com/gfm/#example-51 + test_identical_markdown_events!(r##"Foo *bar +baz* +===="##); +} + +#[test] +fn gfm_markdown_setext_headings_52() { + // https://github.github.com/gfm/#example-52 + test_identical_markdown_events!(" Foo *bar\nbaz*\t\n====",r##"Foo *bar +baz* +===="##); +} + +#[test] +fn gfm_markdown_setext_headings_53() { + // https://github.github.com/gfm/#example-53 + test_identical_markdown_events!(r##"Foo +------------------------- + +Foo +="##); +} + +#[test] +fn gfm_markdown_setext_headings_54() { + // https://github.github.com/gfm/#example-54 + test_identical_markdown_events!(r##" Foo +--- + + Foo +----- + + Foo + ==="##,r##"Foo +--- + +Foo +----- + +Foo +==="##); +} + +#[test] +fn gfm_markdown_setext_headings_55() { + // https://github.github.com/gfm/#example-55 + test_identical_markdown_events!(r##" Foo + --- + + Foo +---"##); +} + +#[test] +fn gfm_markdown_setext_headings_56() { + // https://github.github.com/gfm/#example-56 + test_identical_markdown_events!("Foo\n ---- ",r##"Foo +----"##); +} + +#[test] +fn gfm_markdown_setext_headings_57() { + // https://github.github.com/gfm/#example-57 + test_identical_markdown_events!(r##"Foo + ---"##,r##"Foo +\---"##); +} + +#[test] +fn gfm_markdown_setext_headings_58() { + // https://github.github.com/gfm/#example-58 + test_identical_markdown_events!(r##"Foo += = + +Foo +--- -"##); +} + +#[test] +fn gfm_markdown_setext_headings_59() { + // https://github.github.com/gfm/#example-59 + test_identical_markdown_events!("Foo \n-----",r##"Foo +-----"##); +} + +#[test] +fn gfm_markdown_setext_headings_60() { + // https://github.github.com/gfm/#example-60 + test_identical_markdown_events!(r##"Foo\ +----"##); +} + +#[test] +fn gfm_markdown_setext_headings_61() { + // https://github.github.com/gfm/#example-61 + test_identical_markdown_events!(r##"`Foo +---- +` + +"##); +} + +#[test] +fn gfm_markdown_setext_headings_62() { + // https://github.github.com/gfm/#example-62 + test_identical_markdown_events!(r##"> Foo +---"##); +} + +#[test] +fn gfm_markdown_setext_headings_63() { + // https://github.github.com/gfm/#example-63 + test_identical_markdown_events!(r##"> foo +bar +==="##,r##"> foo +> bar +> \==="##); +} + +#[test] +fn gfm_markdown_setext_headings_64() { + // https://github.github.com/gfm/#example-64 + test_identical_markdown_events!(r##"- Foo +---"##); +} + +#[test] +fn gfm_markdown_setext_headings_65() { + // https://github.github.com/gfm/#example-65 + test_identical_markdown_events!(r##"Foo +Bar +---"##); +} + +#[test] +fn gfm_markdown_setext_headings_66() { + // https://github.github.com/gfm/#example-66 + test_identical_markdown_events!(r##"--- +Foo +--- +Bar +--- +Baz"##); +} + +#[test] +fn gfm_markdown_setext_headings_67() { + // https://github.github.com/gfm/#example-67 + test_identical_markdown_events!(r##" +===="##,r##"===="##); +} + +#[test] +fn gfm_markdown_setext_headings_68() { + // https://github.github.com/gfm/#example-68 + test_identical_markdown_events!(r##"--- +---"##); +} + +#[test] +fn gfm_markdown_setext_headings_69() { + // https://github.github.com/gfm/#example-69 + test_identical_markdown_events!(r##"- foo +-----"##); +} + +#[test] +fn gfm_markdown_setext_headings_70() { + // https://github.github.com/gfm/#example-70 + test_identical_markdown_events!(r##" foo +---"##); +} + +#[test] +fn gfm_markdown_setext_headings_71() { + // https://github.github.com/gfm/#example-71 + test_identical_markdown_events!(r##"> foo +-----"##); +} + +#[test] +fn gfm_markdown_setext_headings_72() { + // https://github.github.com/gfm/#example-72 + test_identical_markdown_events!(r##"\> foo +------"##); +} + +#[test] +fn gfm_markdown_setext_headings_73() { + // https://github.github.com/gfm/#example-73 + test_identical_markdown_events!(r##"Foo + +bar +--- +baz"##); +} + +#[test] +fn gfm_markdown_setext_headings_74() { + // https://github.github.com/gfm/#example-74 + test_identical_markdown_events!(r##"Foo +bar + +--- + +baz"##); +} + +#[test] +fn gfm_markdown_setext_headings_75() { + // https://github.github.com/gfm/#example-75 + test_identical_markdown_events!(r##"Foo +bar +* * * +baz"##); +} + +#[test] +fn gfm_markdown_setext_headings_76() { + // https://github.github.com/gfm/#example-76 + test_identical_markdown_events!(r##"Foo +bar +\--- +baz"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_77() { + // https://github.github.com/gfm/#example-77 + test_identical_markdown_events!(r##" a simple + indented code block"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_78() { + // https://github.github.com/gfm/#example-78 + test_identical_markdown_events!(r##" - foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_79() { + // https://github.github.com/gfm/#example-79 + test_identical_markdown_events!(r##"1. foo + + - bar"##,r##"1. foo + + - bar"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_80() { + // https://github.github.com/gfm/#example-80 + test_identical_markdown_events!(r##" + *hi* + + - one"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_81() { + // https://github.github.com/gfm/#example-81 + test_identical_markdown_events!(" chunk1\n\n chunk2\n \n \n \n chunk3",r##" chunk1 + + chunk2 + + + + chunk3"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_82() { + // https://github.github.com/gfm/#example-82 + test_identical_markdown_events!(" chunk1\n \n chunk2",r##" chunk1 + + chunk2"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_83() { + // https://github.github.com/gfm/#example-83 + test_identical_markdown_events!(r##"Foo + bar"##,r##"Foo +bar"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_84() { + // https://github.github.com/gfm/#example-84 + test_identical_markdown_events!(r##" foo +bar"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_85() { + // https://github.github.com/gfm/#example-85 + test_identical_markdown_events!(r##"# Heading + foo +Heading +------ + foo +----"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_86() { + // https://github.github.com/gfm/#example-86 + test_identical_markdown_events!(r##" foo + bar"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_87() { + // https://github.github.com/gfm/#example-87 + test_identical_markdown_events!("\n \n foo\n ",r##" foo"##); +} + +#[test] +fn gfm_markdown_indented_code_blocks_88() { + // https://github.github.com/gfm/#example-88 + test_identical_markdown_events!(" foo ",r##" foo"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_89() { + // https://github.github.com/gfm/#example-89 + test_identical_markdown_events!(r##"``` +< + > +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_90() { + // https://github.github.com/gfm/#example-90 + test_identical_markdown_events!(r##"~~~ +< + > +~~~"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_91() { + // https://github.github.com/gfm/#example-91 + test_identical_markdown_events!(r##"`` +foo +``"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_92() { + // https://github.github.com/gfm/#example-92 + test_identical_markdown_events!(r##"``` +aaa +~~~ +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_93() { + // https://github.github.com/gfm/#example-93 + test_identical_markdown_events!(r##"~~~ +aaa +``` +~~~"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_94() { + // https://github.github.com/gfm/#example-94 + test_identical_markdown_events!(r##"```` +aaa +``` +``````"##,r##"```` +aaa +``` +````"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_95() { + // https://github.github.com/gfm/#example-95 + test_identical_markdown_events!(r##"~~~~ +aaa +~~~ +~~~~"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_96() { + // https://github.github.com/gfm/#example-96 + test_identical_markdown_events!(r##"```"##,r##"``` +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_97() { + // https://github.github.com/gfm/#example-97 + test_identical_markdown_events!(r##"````` + +``` +aaa"##,r##"````` + +``` +aaa +`````"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_98() { + // https://github.github.com/gfm/#example-98 + test_identical_markdown_events!(r##"> ``` +> aaa + +bbb"##,r##"> ``` +> aaa +> ``` + +bbb"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_99() { + // https://github.github.com/gfm/#example-99 + test_identical_markdown_events!("```\n\n \n```",r##"``` +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_100() { + // https://github.github.com/gfm/#example-100 + test_identical_markdown_events!(r##"``` +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_101() { + // https://github.github.com/gfm/#example-101 + test_identical_markdown_events!(r##" ``` + aaa +aaa +```"##,r##"``` +aaa +aaa +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_102() { + // https://github.github.com/gfm/#example-102 + test!(r##" ``` +aaa + aaa +aaa + ```"##,r##"``` +aaa +aaa +aaa +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_103() { + // https://github.github.com/gfm/#example-103 + test!(r##" ``` + aaa + aaa + aaa + ```"##,r##"``` +aaa + aaa +aaa +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_104() { + // https://github.github.com/gfm/#example-104 + test_identical_markdown_events!(r##" ``` + aaa + ```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_105() { + // https://github.github.com/gfm/#example-105 + test_identical_markdown_events!(r##"``` +aaa + ```"##,r##"``` +aaa +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_106() { + // https://github.github.com/gfm/#example-106 + test_identical_markdown_events!(r##" ``` +aaa + ```"##,r##"``` +aaa +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_107() { + // https://github.github.com/gfm/#example-107 + test_identical_markdown_events!(r##"``` +aaa + ```"##,r##"``` +aaa + ``` +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_108() { + // https://github.github.com/gfm/#example-108 + test_identical_markdown_events!(r##"``` ``` +aaa"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_109() { + // https://github.github.com/gfm/#example-109 + test_identical_markdown_events!(r##"~~~~~~ +aaa +~~~ ~~"##,r##"~~~~~~ +aaa +~~~ ~~ +~~~~~~"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_110() { + // https://github.github.com/gfm/#example-110 + test_identical_markdown_events!(r##"foo +``` +bar +``` +baz"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_111() { + // https://github.github.com/gfm/#example-111 + test_identical_markdown_events!(r##"foo +--- +~~~ +bar +~~~ +# baz"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_112() { + // https://github.github.com/gfm/#example-112 + test_identical_markdown_events!(r##"```ruby +def foo(x) + return 3 +end +```"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_113() { + // https://github.github.com/gfm/#example-113 + test_identical_markdown_events!(r##"~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~~~~"##,r##"~~~~ ruby startline=3 $%@#$ +def foo(x) + return 3 +end +~~~~"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_114() { + // https://github.github.com/gfm/#example-114 + test_identical_markdown_events!(r##"````; +````"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_115() { + // https://github.github.com/gfm/#example-115 + test_identical_markdown_events!(r##"``` aa ``` +foo"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_116() { + // https://github.github.com/gfm/#example-116 + test_identical_markdown_events!(r##"~~~ aa ``` ~~~ +foo +~~~"##); +} + +#[test] +fn gfm_markdown_fenced_code_blocks_117() { + // https://github.github.com/gfm/#example-117 + test_identical_markdown_events!(r##"``` +``` aaa +```"##); +} + +#[test] +fn gfm_markdown_html_blocks_118() { + // https://github.github.com/gfm/#example-118 + test_identical_markdown_events!(r##"
+
+**Hello**,
+
+_world_.
+
+
"##); +} + +#[test] +fn gfm_markdown_html_blocks_119() { + // https://github.github.com/gfm/#example-119 + test_identical_markdown_events!(r##" + + + +
+ hi +
+ +okay."##); +} + +#[test] +fn gfm_markdown_html_blocks_120() { + // https://github.github.com/gfm/#example-120 + test_identical_markdown_events!(r##"
+ *hello* + "##,r##" +*foo*"##); +} + +#[test] +fn gfm_markdown_html_blocks_122() { + // https://github.github.com/gfm/#example-122 + test_identical_markdown_events!(r##"
+ +*Markdown* + +
"##); +} + +#[test] +fn gfm_markdown_html_blocks_123() { + // https://github.github.com/gfm/#example-123 + test_identical_markdown_events!(r##"
+
"##); +} + +#[test] +fn gfm_markdown_html_blocks_124() { + // https://github.github.com/gfm/#example-124 + test_identical_markdown_events!(r##"
+
"##); +} + +#[test] +fn gfm_markdown_html_blocks_125() { + // https://github.github.com/gfm/#example-125 + test_identical_markdown_events!(r##"
+*foo* + +*bar*"##); +} + +#[test] +fn gfm_markdown_html_blocks_126() { + // https://github.github.com/gfm/#example-126 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_html_blocks_130() { + // https://github.github.com/gfm/#example-130 + test_identical_markdown_events!(r##"
+foo +
"##); +} + +#[test] +fn gfm_markdown_html_blocks_131() { + // https://github.github.com/gfm/#example-131 + test_identical_markdown_events!(r##"
+``` c +int x = 33; +```"##); +} + +#[test] +fn gfm_markdown_html_blocks_132() { + // https://github.github.com/gfm/#example-132 + test_identical_markdown_events!(r##" +*bar* +"##); +} + +#[test] +fn gfm_markdown_html_blocks_133() { + // https://github.github.com/gfm/#example-133 + test_identical_markdown_events!(r##" +*bar* +"##); +} + +#[test] +fn gfm_markdown_html_blocks_134() { + // https://github.github.com/gfm/#example-134 + test_identical_markdown_events!(r##" +*bar* +"##); +} + +#[test] +fn gfm_markdown_html_blocks_135() { + // https://github.github.com/gfm/#example-135 + test_identical_markdown_events!(r##" +*bar*"##); +} + +#[test] +fn gfm_markdown_html_blocks_136() { + // https://github.github.com/gfm/#example-136 + test_identical_markdown_events!(r##" +*foo* +"##); +} + +#[test] +fn gfm_markdown_html_blocks_137() { + // https://github.github.com/gfm/#example-137 + test_identical_markdown_events!(r##" + +*foo* + +"##); +} + +#[test] +fn gfm_markdown_html_blocks_138() { + // https://github.github.com/gfm/#example-138 + test_identical_markdown_events!(r##"*foo*"##); +} + +#[test] +fn gfm_markdown_html_blocks_139() { + // https://github.github.com/gfm/#example-139 + test_identical_markdown_events!(r##"

+import Text.HTML.TagSoup
+
+main :: IO ()
+main = print $ parseTags tags
+
+okay"##); +} + +#[test] +fn gfm_markdown_html_blocks_140() { + // https://github.github.com/gfm/#example-140 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn gfm_markdown_html_blocks_141() { + // https://github.github.com/gfm/#example-141 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn gfm_markdown_html_blocks_142() { + // https://github.github.com/gfm/#example-142 + test_identical_markdown_events!(r##" +*foo*"##); +} + +#[test] +fn gfm_markdown_html_blocks_146() { + // https://github.github.com/gfm/#example-146 + test_identical_markdown_events!(r##"*bar* +*baz*"##); +} + +#[test] +fn gfm_markdown_html_blocks_147() { + // https://github.github.com/gfm/#example-147 + test_identical_markdown_events!(r##"1. *bar*"##); +} + +#[test] +fn gfm_markdown_html_blocks_148() { + // https://github.github.com/gfm/#example-148 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn gfm_markdown_html_blocks_149() { + // https://github.github.com/gfm/#example-149 + test_identical_markdown_events!(r##"'; + +?> +okay"##); +} + +#[test] +fn gfm_markdown_html_blocks_150() { + // https://github.github.com/gfm/#example-150 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_html_blocks_151() { + // https://github.github.com/gfm/#example-151 + test_identical_markdown_events!(r##" +okay"##); +} + +#[test] +fn gfm_markdown_html_blocks_152() { + // https://github.github.com/gfm/#example-152 + test_identical_markdown_events!(r##" + + "##,r##" + + "##); +} + +#[test] +fn gfm_markdown_html_blocks_153() { + // https://github.github.com/gfm/#example-153 + test_identical_markdown_events!(r##"
+ +
"##,r##"
+ +
"##); +} + +#[test] +fn gfm_markdown_html_blocks_154() { + // https://github.github.com/gfm/#example-154 + test_identical_markdown_events!(r##"Foo +
+bar +
"##); +} + +#[test] +fn gfm_markdown_html_blocks_155() { + // https://github.github.com/gfm/#example-155 + test_identical_markdown_events!(r##"
+bar +
+*foo*"##); +} + +#[test] +fn gfm_markdown_html_blocks_156() { + // https://github.github.com/gfm/#example-156 + test_identical_markdown_events!(r##"Foo + +baz"##); +} + +#[test] +fn gfm_markdown_html_blocks_157() { + // https://github.github.com/gfm/#example-157 + test_identical_markdown_events!(r##"
+ +*Emphasized* text. + +
"##); +} + +#[test] +fn gfm_markdown_html_blocks_158() { + // https://github.github.com/gfm/#example-158 + test_identical_markdown_events!(r##"
+*Emphasized* text. +
"##); +} + +#[test] +fn gfm_markdown_html_blocks_159() { + // https://github.github.com/gfm/#example-159 + test_identical_markdown_events!(r##" + + + + + + + +
+Hi +
"##); +} + +#[test] +fn gfm_markdown_html_blocks_160() { + // https://github.github.com/gfm/#example-160 + test_identical_markdown_events!(r##" + + + + + + + +
+ Hi +
"##,r##" + + + + + + + +
+ Hi +
"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_161() { + // https://github.github.com/gfm/#example-161 + test_identical_markdown_events!(r##"[foo]: /url "title" + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_162() { + // https://github.github.com/gfm/#example-162 + test_identical_markdown_events!(" [foo]: \n /url \n 'the title' \n\n[foo]",r##"[foo]: /url 'the title' + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_163() { + // https://github.github.com/gfm/#example-163 + test_identical_markdown_events!(r##"[Foo*bar\]]:my_(url) 'title (with parens)' + +[Foo*bar\]]"##,r##"[Foo*bar\]]: my_(url) 'title (with parens)' + +[Foo*bar\]]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_164() { + // https://github.github.com/gfm/#example-164 + test_identical_markdown_events!(r##"[Foo bar]: + +'title' + +[Foo bar]"##,r##"[Foo bar]: 'title' + +[Foo bar]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_165() { + // https://github.github.com/gfm/#example-165 + test_identical_markdown_events!(r##"[foo]: /url ' +title +line1 +line2 +' + +[foo]"##,r##"[foo]: /url ' +title +line1 +line2 +' + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_166() { + // https://github.github.com/gfm/#example-166 + test_identical_markdown_events!(r##"[foo]: /url 'title + +with blank line' + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_167() { + // https://github.github.com/gfm/#example-167 + test_identical_markdown_events!(r##"[foo]: +/url + +[foo]"##,r##"[foo]: /url + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_168() { + // https://github.github.com/gfm/#example-168 + test_identical_markdown_events!(r##"[foo]: + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_169() { + // https://github.github.com/gfm/#example-169 + test_identical_markdown_events!(r##"[foo]: <> + +[foo]"##,r##"[foo]: <> + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_170() { + // https://github.github.com/gfm/#example-170 + test_identical_markdown_events!(r##"[foo]: (baz) + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_171() { + // https://github.github.com/gfm/#example-171 + test_identical_markdown_events!(r##"[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo]"##,r##"[foo]: /url\bar\*baz "foo\"bar\baz" + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_172() { + // https://github.github.com/gfm/#example-172 + test_identical_markdown_events!(r##"[foo] + +[foo]: url"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_173() { + // https://github.github.com/gfm/#example-173 + test_identical_markdown_events!(r##"[foo] + +[foo]: first +[foo]: second"##,r##"[foo] + +[foo]: first"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_174() { + // https://github.github.com/gfm/#example-174 + test_identical_markdown_events!(r##"[FOO]: /url + +[Foo]"##,r##"[FOO]: /url + +[Foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_175() { + // https://github.github.com/gfm/#example-175 + test_identical_markdown_events!(r##"[ΑΓΩ]: /φου + +[αγω]"##,r##"[ΑΓΩ]: /φου + +[αγω]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_176() { + // https://github.github.com/gfm/#example-176 + test_identical_markdown_events!(r##"[foo]: /url"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_177() { + // https://github.github.com/gfm/#example-177 + test_identical_markdown_events!(r##"[ +foo +]: /url +bar"##,r##"[ foo ]: /url +bar"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_178() { + // https://github.github.com/gfm/#example-178 + test_identical_markdown_events!(r##"[foo]: /url "title" ok"##); +} + +// FIXME(ytmim) the "title" is duplcated here +#[ignore] +#[test] +fn gfm_markdown_link_reference_definitions_179() { + // https://github.github.com/gfm/#example-179 + test_identical_markdown_events!(r##"[foo]: /url +"title" ok"##,r##"[foo]: /url "title""title" ok"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_180() { + // https://github.github.com/gfm/#example-180 + test_identical_markdown_events!(r##" [foo]: /url "title" + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_181() { + // https://github.github.com/gfm/#example-181 + test_identical_markdown_events!(r##"``` +[foo]: /url +``` + +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_182() { + // https://github.github.com/gfm/#example-182 + test_identical_markdown_events!(r##"Foo +[bar]: /baz + +[bar]"##,r##"Foo +[bar]: /baz + +[bar]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_183() { + // https://github.github.com/gfm/#example-183 + test_identical_markdown_events!(r##"# [Foo] +[foo]: /url +> bar"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_184() { + // https://github.github.com/gfm/#example-184 + test_identical_markdown_events!(r##"[foo]: /url +bar +=== +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_185() { + // https://github.github.com/gfm/#example-185 + test_identical_markdown_events!(r##"[foo]: /url +=== +[foo]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_186() { + // https://github.github.com/gfm/#example-186 + test_identical_markdown_events!(r##"[foo]: /foo-url "foo" +[bar]: /bar-url + "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz]"##,r##"[foo]: /foo-url "foo" +[bar]: /bar-url "bar" +[baz]: /baz-url + +[foo], +[bar], +[baz]"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_187() { + // https://github.github.com/gfm/#example-187 + test!(r##"[foo] + +> [foo]: /url"##,r##"[foo] + +> +[foo]: /url"##); +} + +#[test] +fn gfm_markdown_link_reference_definitions_188() { + // https://github.github.com/gfm/#example-188 + test_identical_markdown_events!(r##"[foo]: /url"##); +} + +#[test] +fn gfm_markdown_paragraphs_189() { + // https://github.github.com/gfm/#example-189 + test_identical_markdown_events!(r##"aaa + +bbb"##); +} + +#[test] +fn gfm_markdown_paragraphs_190() { + // https://github.github.com/gfm/#example-190 + test_identical_markdown_events!(r##"aaa +bbb + +ccc +ddd"##); +} + +#[test] +fn gfm_markdown_paragraphs_191() { + // https://github.github.com/gfm/#example-191 + test_identical_markdown_events!(r##"aaa + + +bbb"##); +} + +#[test] +fn gfm_markdown_paragraphs_192() { + // https://github.github.com/gfm/#example-192 + test_identical_markdown_events!(r##" aaa + bbb"##,r##"aaa +bbb"##); +} + +#[test] +fn gfm_markdown_paragraphs_193() { + // https://github.github.com/gfm/#example-193 + test_identical_markdown_events!(r##"aaa + bbb + ccc"##,r##"aaa +bbb +ccc"##); +} + +#[test] +fn gfm_markdown_paragraphs_194() { + // https://github.github.com/gfm/#example-194 + test_identical_markdown_events!(r##" aaa +bbb"##,r##"aaa +bbb"##); +} + +#[test] +fn gfm_markdown_paragraphs_195() { + // https://github.github.com/gfm/#example-195 + test_identical_markdown_events!(r##" aaa +bbb"##); +} + +#[test] +fn gfm_markdown_paragraphs_196() { + // https://github.github.com/gfm/#example-196 + test_identical_markdown_events!("aaa \nbbb "); +} + +#[test] +fn gfm_markdown_blank_lines_197() { + // https://github.github.com/gfm/#example-197 + test_identical_markdown_events!(" \n\naaa\n \n\n# aaa\n\n ",r##"aaa + + +# aaa"##); +} + +#[test] +fn gfm_markdown_tables_extension_198() { + // https://github.github.com/gfm/#example-198 + test_identical_markdown_events!(r##"| foo | bar | +| --- | --- | +| baz | bim |"##); +} + +#[test] +fn gfm_markdown_tables_extension_199() { + // https://github.github.com/gfm/#example-199 + test_identical_markdown_events!(r##"| abc | defghi | +:-: | -----------: +bar | baz"##,r##"| abc | defghi | +| :-: | -----: | +| bar | baz |"##); +} + +#[test] +fn gfm_markdown_tables_extension_200() { + // https://github.github.com/gfm/#example-200 + test_identical_markdown_events!(r##"| f\|oo | +| ------ | +| b `\|` az | +| b **\|** im |"##,r##"| f\|oo | +| ----------- | +| b `\|` az | +| b **\|** im |"##); +} + +#[test] +fn gfm_markdown_tables_extension_201() { + // https://github.github.com/gfm/#example-201 + test_identical_markdown_events!(r##"| abc | def | +| --- | --- | +| bar | baz | +> bar"##); +} + +#[test] +fn gfm_markdown_tables_extension_202() { + // https://github.github.com/gfm/#example-202 + test_identical_markdown_events!(r##"| abc | def | +| --- | --- | +| bar | baz | +bar + +bar"##,r##"| abc | def | +| --- | --- | +| bar | baz | +| bar | | + +bar"##); +} + +#[test] +fn gfm_markdown_tables_extension_203() { + // https://github.github.com/gfm/#example-203 + test_identical_markdown_events!(r##"| abc | def | +| --- | +| bar |"##); +} + +#[test] +fn gfm_markdown_tables_extension_204() { + // https://github.github.com/gfm/#example-204 + test_identical_markdown_events!(r##"| abc | def | +| --- | --- | +| bar | +| bar | baz | boo |"##,r##"| abc | def | +| --- | --- | +| bar | | +| bar | baz |"##); +} + +#[test] +fn gfm_markdown_tables_extension_205() { + // https://github.github.com/gfm/#example-205 + test_identical_markdown_events!(r##"| abc | def | +| --- | --- |"##); +} + +#[test] +fn gfm_markdown_block_quotes_206() { + // https://github.github.com/gfm/#example-206 + test_identical_markdown_events!(r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_207() { + // https://github.github.com/gfm/#example-207 + test_identical_markdown_events!(r##"># Foo +>bar +> baz"##,r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_208() { + // https://github.github.com/gfm/#example-208 + test_identical_markdown_events!(r##" > # Foo + > bar + > baz"##,r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_209() { + // https://github.github.com/gfm/#example-209 + test_identical_markdown_events!(r##" > # Foo + > bar + > baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_210() { + // https://github.github.com/gfm/#example-210 + test_identical_markdown_events!(r##"> # Foo +> bar +baz"##,r##"> # Foo +> bar +> baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_211() { + // https://github.github.com/gfm/#example-211 + test_identical_markdown_events!(r##"> bar +baz +> foo"##,r##"> bar +> baz +> foo"##); +} + +#[test] +fn gfm_markdown_block_quotes_212() { + // https://github.github.com/gfm/#example-212 + test_identical_markdown_events!(r##"> foo +---"##); +} + +#[test] +fn gfm_markdown_block_quotes_213() { + // https://github.github.com/gfm/#example-213 + test_identical_markdown_events!(r##"> - foo +- bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_214() { + // https://github.github.com/gfm/#example-214 + test_identical_markdown_events!(r##"> foo + bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_215() { + // https://github.github.com/gfm/#example-215 + test_identical_markdown_events!(r##"> ``` +foo +```"##,r##"> ``` +> +> ``` +foo +``` +```"##); +} + +#[test] +fn gfm_markdown_block_quotes_216() { + // https://github.github.com/gfm/#example-216 + test_identical_markdown_events!(r##"> foo + - bar"##,r##"> foo +> \- bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_217() { + // https://github.github.com/gfm/#example-217 + test_identical_markdown_events!(r##">"##); +} + +#[test] +fn gfm_markdown_block_quotes_218() { + // https://github.github.com/gfm/#example-218 + test_identical_markdown_events!(">\n> \n> ",r##"> +> +>"##); +} + +#[test] +fn gfm_markdown_block_quotes_219() { + // https://github.github.com/gfm/#example-219 + test_identical_markdown_events!(">\n> foo\n> ",r##"> foo +>"##); +} + +#[test] +fn gfm_markdown_block_quotes_220() { + // https://github.github.com/gfm/#example-220 + test_identical_markdown_events!(r##"> foo + +> bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_221() { + // https://github.github.com/gfm/#example-221 + test_identical_markdown_events!(r##"> foo +> bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_222() { + // https://github.github.com/gfm/#example-222 + test_identical_markdown_events!(r##"> foo +> +> bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_223() { + // https://github.github.com/gfm/#example-223 + test_identical_markdown_events!(r##"foo +> bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_224() { + // https://github.github.com/gfm/#example-224 + test_identical_markdown_events!(r##"> aaa +*** +> bbb"##); +} + +#[test] +fn gfm_markdown_block_quotes_225() { + // https://github.github.com/gfm/#example-225 + test_identical_markdown_events!(r##"> bar +baz"##,r##"> bar +> baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_226() { + // https://github.github.com/gfm/#example-226 + test_identical_markdown_events!(r##"> bar + +baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_227() { + // https://github.github.com/gfm/#example-227 + test_identical_markdown_events!(r##"> bar +> +baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_228() { + // https://github.github.com/gfm/#example-228 + test_identical_markdown_events!(r##"> > > foo +bar"##,r##"> > > foo +> > > bar"##); +} + +#[test] +fn gfm_markdown_block_quotes_229() { + // https://github.github.com/gfm/#example-229 + test_identical_markdown_events!(r##">>> foo +> bar +>>baz"##,r##"> > > foo +> > > bar +> > > baz"##); +} + +#[test] +fn gfm_markdown_block_quotes_230() { + // https://github.github.com/gfm/#example-230 + test_identical_markdown_events!(r##"> code + +> not code"##,r##"> code + +> not code"##); +} + +#[test] +fn gfm_markdown_list_items_231() { + // https://github.github.com/gfm/#example-231 + test_identical_markdown_events!(r##"A paragraph +with two lines. + + indented code + +> A block quote."##); +} + +#[test] +fn gfm_markdown_list_items_232() { + // https://github.github.com/gfm/#example-232 + test_identical_markdown_events!(r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn gfm_markdown_list_items_233() { + // https://github.github.com/gfm/#example-233 + test_identical_markdown_events!(r##"- one + + two"##,r##"- one + +two"##); +} + +#[test] +fn gfm_markdown_list_items_234() { + // https://github.github.com/gfm/#example-234 + test_identical_markdown_events!(r##"- one + + two"##); +} + +#[test] +fn gfm_markdown_list_items_235() { + // https://github.github.com/gfm/#example-235 + test!(r##" - one + + two"##,r##"- one + + + + two"##); +} + +#[test] +fn gfm_markdown_list_items_236() { + // https://github.github.com/gfm/#example-236 + test_identical_markdown_events!(r##" - one + + two"##,r##"- one + + two"##); +} + +#[test] +fn gfm_markdown_list_items_237() { + // https://github.github.com/gfm/#example-237 + test_identical_markdown_events!(r##" > > 1. one +>> +>> two"##,r##"> > 1. one +> > +> > two"##); +} + +#[test] +fn gfm_markdown_list_items_238() { + // https://github.github.com/gfm/#example-238 + test_identical_markdown_events!(r##">>- one +>> + > > two"##,r##"> > - one +> > +> > two"##); +} + +#[test] +fn gfm_markdown_list_items_239() { + // https://github.github.com/gfm/#example-239 + test_identical_markdown_events!(r##"-one + +2.two"##); +} + +#[test] +fn gfm_markdown_list_items_240() { + // https://github.github.com/gfm/#example-240 + test_identical_markdown_events!(r##"- foo + + + bar"##); +} + +#[test] +fn gfm_markdown_list_items_241() { + // https://github.github.com/gfm/#example-241 + test_identical_markdown_events!(r##"1. foo + + ``` + bar + ``` + + baz + + > bam"##,r##"1. foo + + ``` + bar + ``` + + baz + + > bam"##); +} + +#[test] +fn gfm_markdown_list_items_242() { + // https://github.github.com/gfm/#example-242 + test_identical_markdown_events!(r##"- Foo + + bar + + + baz"##); +} + +#[test] +fn gfm_markdown_list_items_243() { + // https://github.github.com/gfm/#example-243 + test_identical_markdown_events!(r##"123456789. ok"##); +} + +#[test] +fn gfm_markdown_list_items_244() { + // https://github.github.com/gfm/#example-244 + test_identical_markdown_events!(r##"1234567890. not ok"##); +} + +#[test] +fn gfm_markdown_list_items_245() { + // https://github.github.com/gfm/#example-245 + test_identical_markdown_events!(r##"0. ok"##); +} + +#[test] +fn gfm_markdown_list_items_246() { + // https://github.github.com/gfm/#example-246 + test_identical_markdown_events!(r##"003. ok"##); +} + +#[test] +fn gfm_markdown_list_items_247() { + // https://github.github.com/gfm/#example-247 + test_identical_markdown_events!(r##"-1. not ok"##); +} + +#[test] +fn gfm_markdown_list_items_248() { + // https://github.github.com/gfm/#example-248 + test_identical_markdown_events!(r##"- foo + + bar"##); +} + +#[test] +fn gfm_markdown_list_items_249() { + // https://github.github.com/gfm/#example-249 + test_identical_markdown_events!(r##" 10. foo + + bar"##,r##"10. foo + + bar"##); +} + +#[test] +fn gfm_markdown_list_items_250() { + // https://github.github.com/gfm/#example-250 + test_identical_markdown_events!(r##" indented code + +paragraph + + more code"##); +} + +#[test] +fn gfm_markdown_list_items_251() { + // https://github.github.com/gfm/#example-251 + test_identical_markdown_events!(r##"1. indented code + + paragraph + + more code"##); +} + +#[test] +fn gfm_markdown_list_items_252() { + // https://github.github.com/gfm/#example-252 + test_identical_markdown_events!(r##"1. indented code + + paragraph + + more code"##); +} + +#[test] +fn gfm_markdown_list_items_253() { + // https://github.github.com/gfm/#example-253 + test_identical_markdown_events!(r##" foo + +bar"##,r##"foo + +bar"##); +} + +#[test] +fn gfm_markdown_list_items_254() { + // https://github.github.com/gfm/#example-254 + test_identical_markdown_events!(r##"- foo + + bar"##,r##"- foo + +bar"##); +} + +#[test] +fn gfm_markdown_list_items_255() { + // https://github.github.com/gfm/#example-255 + test_identical_markdown_events!(r##"- foo + + bar"##,r##"- foo + + bar"##); +} + +#[test] +fn gfm_markdown_list_items_256() { + // https://github.github.com/gfm/#example-256 + test_identical_markdown_events!(r##"- + foo +- + ``` + bar + ``` +- + baz"##,r##"- foo +- ``` + bar + ``` +- baz"##); +} + +#[test] +fn gfm_markdown_list_items_257() { + // https://github.github.com/gfm/#example-257 + test_identical_markdown_events!("- \n foo",r##"- foo"##); +} + +#[test] +fn gfm_markdown_list_items_258() { + // https://github.github.com/gfm/#example-258 + test_identical_markdown_events!(r##"- + + foo"##,r##"- + +foo"##); +} + +#[test] +fn gfm_markdown_list_items_259() { + // https://github.github.com/gfm/#example-259 + test_identical_markdown_events!(r##"- foo +- +- bar"##); +} + +#[test] +fn gfm_markdown_list_items_260() { + // https://github.github.com/gfm/#example-260 + test_identical_markdown_events!("- foo\n- \n- bar",r##"- foo +- +- bar"##); +} + +#[test] +fn gfm_markdown_list_items_261() { + // https://github.github.com/gfm/#example-261 + test_identical_markdown_events!(r##"1. foo +2. +3. bar"##); +} + +#[test] +fn gfm_markdown_list_items_262() { + // https://github.github.com/gfm/#example-262 + test_identical_markdown_events!(r##"*"##); +} + +#[test] +fn gfm_markdown_list_items_263() { + // https://github.github.com/gfm/#example-263 + test_identical_markdown_events!(r##"foo +* + +foo +1."##); +} + +#[test] +fn gfm_markdown_list_items_264() { + // https://github.github.com/gfm/#example-264 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn gfm_markdown_list_items_265() { + // https://github.github.com/gfm/#example-265 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn gfm_markdown_list_items_266() { + // https://github.github.com/gfm/#example-266 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn gfm_markdown_list_items_267() { + // https://github.github.com/gfm/#example-267 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn gfm_markdown_list_items_268() { + // https://github.github.com/gfm/#example-268 + test_identical_markdown_events!(r##" 1. A paragraph +with two lines. + + indented code + + > A block quote."##,r##"1. A paragraph + with two lines. + + indented code + + > A block quote."##); +} + +#[test] +fn gfm_markdown_list_items_269() { + // https://github.github.com/gfm/#example-269 + test_identical_markdown_events!(r##" 1. A paragraph + with two lines."##,r##"1. A paragraph + with two lines."##); +} + +#[test] +fn gfm_markdown_list_items_270() { + // https://github.github.com/gfm/#example-270 + test_identical_markdown_events!(r##"> 1. > Blockquote +continued here."##,r##"> 1. > Blockquote +> > continued here."##); +} + +#[test] +fn gfm_markdown_list_items_271() { + // https://github.github.com/gfm/#example-271 + test_identical_markdown_events!(r##"> 1. > Blockquote +> continued here."##,r##"> 1. > Blockquote +> > continued here."##); +} + +#[test] +fn gfm_markdown_list_items_272() { + // https://github.github.com/gfm/#example-272 + test_identical_markdown_events!(r##"- foo + - bar + - baz + - boo"##); +} + +#[test] +fn gfm_markdown_list_items_273() { + // https://github.github.com/gfm/#example-273 + test_identical_markdown_events!(r##"- foo + - bar + - baz + - boo"##,r##"- foo +- bar +- baz +- boo"##); +} + +#[test] +fn gfm_markdown_list_items_274() { + // https://github.github.com/gfm/#example-274 + test_identical_markdown_events!(r##"10) foo + - bar"##); +} + +#[test] +fn gfm_markdown_list_items_275() { + // https://github.github.com/gfm/#example-275 + test_identical_markdown_events!(r##"10) foo + - bar"##,r##"10) foo +- bar"##); +} + +#[test] +fn gfm_markdown_list_items_276() { + // https://github.github.com/gfm/#example-276 + test_identical_markdown_events!(r##"- - foo"##); +} + +#[test] +fn gfm_markdown_list_items_277() { + // https://github.github.com/gfm/#example-277 + test_identical_markdown_events!(r##"1. - 2. foo"##); +} + +#[test] +fn gfm_markdown_list_items_278() { + // https://github.github.com/gfm/#example-278 + test_identical_markdown_events!(r##"- # Foo +- Bar + --- + baz"##); +} + +#[test] +fn gfm_markdown_lists_281() { + // https://github.github.com/gfm/#example-281 + test_identical_markdown_events!(r##"- foo +- bar ++ baz"##); +} + +#[test] +fn gfm_markdown_lists_282() { + // https://github.github.com/gfm/#example-282 + test_identical_markdown_events!(r##"1. foo +2. bar +3) baz"##); +} + +#[test] +fn gfm_markdown_lists_283() { + // https://github.github.com/gfm/#example-283 + test_identical_markdown_events!(r##"Foo +- bar +- baz"##); +} + +#[test] +fn gfm_markdown_lists_284() { + // https://github.github.com/gfm/#example-284 + test_identical_markdown_events!(r##"The number of windows in my house is +14. The number of doors is 6."##); +} + +#[test] +fn gfm_markdown_lists_285() { + // https://github.github.com/gfm/#example-285 + test_identical_markdown_events!(r##"The number of windows in my house is +1. The number of doors is 6."##,r##"The number of windows in my house is +1. The number of doors is 6."##); +} + +#[test] +fn gfm_markdown_lists_286() { + // https://github.github.com/gfm/#example-286 + test_identical_markdown_events!(r##"- foo + +- bar + + +- baz"##); +} + +#[test] +fn gfm_markdown_lists_287() { + // https://github.github.com/gfm/#example-287 + test_identical_markdown_events!(r##"- foo + - bar + - baz + + + bim"##); +} + +#[test] +fn gfm_markdown_lists_288() { + // https://github.github.com/gfm/#example-288 + test_identical_markdown_events!(r##"- foo +- bar + + + +- baz +- bim"##); +} + +#[test] +fn gfm_markdown_lists_289() { + // https://github.github.com/gfm/#example-289 + test_identical_markdown_events!(r##"- foo + + notcode + +- foo + + + + code"##,r##"- foo + + notcode + +- foo + + + + code"##); +} + +#[test] +fn gfm_markdown_lists_290() { + // https://github.github.com/gfm/#example-290 + test_identical_markdown_events!(r##"- a + - b + - c + - d + - e + - f +- g"##,r##"- a +- b +- c +- d +- e +- f +- g"##); +} + +#[test] +fn gfm_markdown_lists_291() { + // https://github.github.com/gfm/#example-291 + test_identical_markdown_events!(r##"1. a + + 2. b + + 3. c"##,r##"1. a + +2. b + +3. c"##); +} + +#[test] +fn gfm_markdown_lists_292() { + // https://github.github.com/gfm/#example-292 + test_identical_markdown_events!(r##"- a + - b + - c + - d + - e"##,r##"- a +- b +- c +- d + \- e"##); +} + +#[test] +fn gfm_markdown_lists_293() { + // https://github.github.com/gfm/#example-293 + test!(r##"1. a + + 2. b + + 3. c"##,r##"1. a + +2. b + + + + 3. c"##); +} + +#[test] +fn gfm_markdown_lists_294() { + // https://github.github.com/gfm/#example-294 + test_identical_markdown_events!(r##"- a +- b + +- c"##); +} + +#[test] +fn gfm_markdown_lists_295() { + // https://github.github.com/gfm/#example-295 + test_identical_markdown_events!(r##"* a +* + +* c"##); +} + +#[test] +fn gfm_markdown_lists_296() { + // https://github.github.com/gfm/#example-296 + test_identical_markdown_events!(r##"- a +- b + + c +- d"##); +} + +#[test] +fn gfm_markdown_lists_297() { + // https://github.github.com/gfm/#example-297 + test!(r##"- a +- b + + [ref]: /url +- d"##,r##"- a +- b + +[ref]: /url +- d"##); +} + +#[test] +fn gfm_markdown_lists_298() { + // https://github.github.com/gfm/#example-298 + test_identical_markdown_events!(r##"- a +- ``` + b + + + ``` +- c"##,r##"- a +- ``` + b + ``` +- c"##); +} + +#[test] +fn gfm_markdown_lists_299() { + // https://github.github.com/gfm/#example-299 + test_identical_markdown_events!(r##"- a + - b + + c +- d"##); +} + +#[test] +fn gfm_markdown_lists_300() { + // https://github.github.com/gfm/#example-300 + test_identical_markdown_events!(r##"* a + > b + > +* c"##); +} + +#[test] +fn gfm_markdown_lists_301() { + // https://github.github.com/gfm/#example-301 + test_identical_markdown_events!(r##"- a + > b + ``` + c + ``` +- d"##); +} + +#[test] +fn gfm_markdown_lists_302() { + // https://github.github.com/gfm/#example-302 + test_identical_markdown_events!(r##"- a"##); +} + +#[test] +fn gfm_markdown_lists_303() { + // https://github.github.com/gfm/#example-303 + test_identical_markdown_events!(r##"- a + - b"##); +} + +#[test] +fn gfm_markdown_lists_304() { + // https://github.github.com/gfm/#example-304 + test_identical_markdown_events!(r##"1. ``` + foo + ``` + + bar"##); +} + +#[test] +fn gfm_markdown_lists_305() { + // https://github.github.com/gfm/#example-305 + test_identical_markdown_events!(r##"* foo + * bar + + baz"##); +} + +#[test] +fn gfm_markdown_lists_306() { + // https://github.github.com/gfm/#example-306 + test_identical_markdown_events!(r##"- a + - b + - c + +- d + - e + - f"##); +} + +#[test] +fn gfm_markdown_inlines_307() { + // https://github.github.com/gfm/#example-307 + test_identical_markdown_events!(r##"`hi`lo`"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_308() { + // https://github.github.com/gfm/#example-308 + test_identical_markdown_events!(r##"\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_309() { + // https://github.github.com/gfm/#example-309 + test_identical_markdown_events!(r##"\ \A\a\ \3\φ\«"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_310() { + // https://github.github.com/gfm/#example-310 + test_identical_markdown_events!(r##"\*not emphasized* +\
not a tag +\[not a link](/foo) +\`not code` +1\. not a list +\* not a list +\# not a heading +\[foo]: /url "not a reference" +\ö not a character entity"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_311() { + // https://github.github.com/gfm/#example-311 + test_identical_markdown_events!(r##"\\*emphasis*"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_312() { + // https://github.github.com/gfm/#example-312 + test_identical_markdown_events!(r##"foo\ +bar"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_313() { + // https://github.github.com/gfm/#example-313 + test_identical_markdown_events!(r##"`` \[\` ``"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_314() { + // https://github.github.com/gfm/#example-314 + test_identical_markdown_events!(r##" \[\]"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_315() { + // https://github.github.com/gfm/#example-315 + test_identical_markdown_events!(r##"~~~ +\[\] +~~~"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_316() { + // https://github.github.com/gfm/#example-316 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_backslash_escapes_317() { + // https://github.github.com/gfm/#example-317 + test_identical_markdown_events!(r##"
"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_318() { + // https://github.github.com/gfm/#example-318 + test_identical_markdown_events!(r##"[foo](/bar\* "ti\*tle")"##); +} + +#[test] +fn gfm_markdown_backslash_escapes_319() { + // https://github.github.com/gfm/#example-319 + test_identical_markdown_events!(r##"[foo] + +[foo]: /bar\* "ti\*tle""##); +} + +#[test] +fn gfm_markdown_backslash_escapes_320() { + // https://github.github.com/gfm/#example-320 + test_identical_markdown_events!(r##"``` foo\+bar +foo +```"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_321() { + // https://github.github.com/gfm/#example-321 + test_identical_markdown_events!(r##"  & © Æ Ď +¾ ℋ ⅆ +∲ ≧̸"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_322() { + // https://github.github.com/gfm/#example-322 + test_identical_markdown_events!(r##"# Ӓ Ϡ �"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_323() { + // https://github.github.com/gfm/#example-323 + test_identical_markdown_events!(r##"" ആ ಫ"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_324() { + // https://github.github.com/gfm/#example-324 + test_identical_markdown_events!(r##"  &x; &#; &#x; +� +&#abcdef0; +&ThisIsNotDefined; &hi?;"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_325() { + // https://github.github.com/gfm/#example-325 + test_identical_markdown_events!(r##"©"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_326() { + // https://github.github.com/gfm/#example-326 + test_identical_markdown_events!(r##"&MadeUpEntity;"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_327() { + // https://github.github.com/gfm/#example-327 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_328() { + // https://github.github.com/gfm/#example-328 + test_identical_markdown_events!(r##"[foo](/föö "föö")"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_329() { + // https://github.github.com/gfm/#example-329 + test_identical_markdown_events!(r##"[foo] + +[foo]: /föö "föö""##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_330() { + // https://github.github.com/gfm/#example-330 + test_identical_markdown_events!(r##"``` föö +foo +```"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_331() { + // https://github.github.com/gfm/#example-331 + test_identical_markdown_events!(r##"`föö`"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_332() { + // https://github.github.com/gfm/#example-332 + test_identical_markdown_events!(r##" föfö"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_333() { + // https://github.github.com/gfm/#example-333 + test_identical_markdown_events!(r##"*foo* +*foo*"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_334() { + // https://github.github.com/gfm/#example-334 + test_identical_markdown_events!(r##"* foo + +* foo"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_335() { + // https://github.github.com/gfm/#example-335 + test_identical_markdown_events!(r##"foo bar"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_336() { + // https://github.github.com/gfm/#example-336 + test_identical_markdown_events!(r##" foo"##); +} + +#[test] +fn gfm_markdown_entity_and_numeric_character_references_337() { + // https://github.github.com/gfm/#example-337 + test_identical_markdown_events!(r##"[a](url "tit")"##); +} + +#[test] +fn gfm_markdown_code_spans_338() { + // https://github.github.com/gfm/#example-338 + test_identical_markdown_events!(r##"`foo`"##); +} + +#[test] +fn gfm_markdown_code_spans_339() { + // https://github.github.com/gfm/#example-339 + test_identical_markdown_events!(r##"`` foo ` bar ``"##); +} + +#[test] +fn gfm_markdown_code_spans_340() { + // https://github.github.com/gfm/#example-340 + test_identical_markdown_events!(r##"` `` `"##); +} + +#[test] +fn gfm_markdown_code_spans_341() { + // https://github.github.com/gfm/#example-341 + test_identical_markdown_events!(r##"` `` `"##); +} + +#[test] +fn gfm_markdown_code_spans_342() { + // https://github.github.com/gfm/#example-342 + test_identical_markdown_events!(r##"` a`"##); +} + +#[test] +fn gfm_markdown_code_spans_343() { + // https://github.github.com/gfm/#example-343 + test_identical_markdown_events!(r##"` b `"##); +} + +#[test] +fn gfm_markdown_code_spans_344() { + // https://github.github.com/gfm/#example-344 + test_identical_markdown_events!(r##"` ` +` `"##); +} + +#[test] +fn gfm_markdown_code_spans_345() { + // https://github.github.com/gfm/#example-345 + test_identical_markdown_events!("``\nfoo\nbar \nbaz\n``"); +} + +#[test] +fn gfm_markdown_code_spans_346() { + // https://github.github.com/gfm/#example-346 + test_identical_markdown_events!("``\nfoo \n``"); +} + +#[test] +fn gfm_markdown_code_spans_347() { + // https://github.github.com/gfm/#example-347 + test_identical_markdown_events!("`foo bar \nbaz`"); +} + +#[test] +fn gfm_markdown_code_spans_348() { + // https://github.github.com/gfm/#example-348 + test_identical_markdown_events!(r##"`foo\`bar`"##); +} + +#[test] +fn gfm_markdown_code_spans_349() { + // https://github.github.com/gfm/#example-349 + test_identical_markdown_events!(r##"``foo`bar``"##); +} + +#[test] +fn gfm_markdown_code_spans_350() { + // https://github.github.com/gfm/#example-350 + test_identical_markdown_events!(r##"` foo `` bar `"##); +} + +#[test] +fn gfm_markdown_code_spans_351() { + // https://github.github.com/gfm/#example-351 + test_identical_markdown_events!(r##"*foo`*`"##); +} + +#[test] +fn gfm_markdown_code_spans_352() { + // https://github.github.com/gfm/#example-352 + test_identical_markdown_events!(r##"[not a `link](/foo`)"##); +} + +#[test] +fn gfm_markdown_code_spans_353() { + // https://github.github.com/gfm/#example-353 + test_identical_markdown_events!(r##"``"##); +} + +#[test] +fn gfm_markdown_code_spans_354() { + // https://github.github.com/gfm/#example-354 + test_identical_markdown_events!(r##"`"##); +} + +#[test] +fn gfm_markdown_code_spans_355() { + // https://github.github.com/gfm/#example-355 + test_identical_markdown_events!(r##"``"##); +} + +#[test] +fn gfm_markdown_code_spans_356() { + // https://github.github.com/gfm/#example-356 + test_identical_markdown_events!(r##"`"##); +} + +#[test] +fn gfm_markdown_code_spans_357() { + // https://github.github.com/gfm/#example-357 + test_identical_markdown_events!(r##"```foo``"##); +} + +#[test] +fn gfm_markdown_code_spans_358() { + // https://github.github.com/gfm/#example-358 + test_identical_markdown_events!(r##"`foo"##); +} + +#[test] +fn gfm_markdown_code_spans_359() { + // https://github.github.com/gfm/#example-359 + test_identical_markdown_events!(r##"`foo``bar``"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_360() { + // https://github.github.com/gfm/#example-360 + test_identical_markdown_events!(r##"*foo bar*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_361() { + // https://github.github.com/gfm/#example-361 + test_identical_markdown_events!(r##"a * foo bar*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_362() { + // https://github.github.com/gfm/#example-362 + test_identical_markdown_events!(r##"a*"foo"*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_363() { + // https://github.github.com/gfm/#example-363 + test_identical_markdown_events!(r##"* a *"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_364() { + // https://github.github.com/gfm/#example-364 + test_identical_markdown_events!(r##"foo*bar*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_365() { + // https://github.github.com/gfm/#example-365 + test_identical_markdown_events!(r##"5*6*78"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_366() { + // https://github.github.com/gfm/#example-366 + test_identical_markdown_events!(r##"_foo bar_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_367() { + // https://github.github.com/gfm/#example-367 + test_identical_markdown_events!(r##"_ foo bar_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_368() { + // https://github.github.com/gfm/#example-368 + test_identical_markdown_events!(r##"a_"foo"_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_369() { + // https://github.github.com/gfm/#example-369 + test_identical_markdown_events!(r##"foo_bar_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_370() { + // https://github.github.com/gfm/#example-370 + test_identical_markdown_events!(r##"5_6_78"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_371() { + // https://github.github.com/gfm/#example-371 + test_identical_markdown_events!(r##"пристаням_стремятся_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_372() { + // https://github.github.com/gfm/#example-372 + test_identical_markdown_events!(r##"aa_"bb"_cc"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_373() { + // https://github.github.com/gfm/#example-373 + test_identical_markdown_events!(r##"foo-_(bar)_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_374() { + // https://github.github.com/gfm/#example-374 + test_identical_markdown_events!(r##"_foo*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_375() { + // https://github.github.com/gfm/#example-375 + test_identical_markdown_events!(r##"*foo bar *"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_376() { + // https://github.github.com/gfm/#example-376 + test_identical_markdown_events!(r##"*foo bar +*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_377() { + // https://github.github.com/gfm/#example-377 + test_identical_markdown_events!(r##"*(*foo)"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_378() { + // https://github.github.com/gfm/#example-378 + test_identical_markdown_events!(r##"*(*foo*)*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_379() { + // https://github.github.com/gfm/#example-379 + test_identical_markdown_events!(r##"*foo*bar"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_380() { + // https://github.github.com/gfm/#example-380 + test_identical_markdown_events!(r##"_foo bar _"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_381() { + // https://github.github.com/gfm/#example-381 + test_identical_markdown_events!(r##"_(_foo)"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_382() { + // https://github.github.com/gfm/#example-382 + test_identical_markdown_events!(r##"_(_foo_)_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_383() { + // https://github.github.com/gfm/#example-383 + test_identical_markdown_events!(r##"_foo_bar"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_384() { + // https://github.github.com/gfm/#example-384 + test_identical_markdown_events!(r##"_пристаням_стремятся"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_385() { + // https://github.github.com/gfm/#example-385 + test_identical_markdown_events!(r##"_foo_bar_baz_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_386() { + // https://github.github.com/gfm/#example-386 + test_identical_markdown_events!(r##"_(bar)_."##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_387() { + // https://github.github.com/gfm/#example-387 + test_identical_markdown_events!(r##"**foo bar**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_388() { + // https://github.github.com/gfm/#example-388 + test_identical_markdown_events!(r##"** foo bar**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_389() { + // https://github.github.com/gfm/#example-389 + test_identical_markdown_events!(r##"a**"foo"**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_390() { + // https://github.github.com/gfm/#example-390 + test_identical_markdown_events!(r##"foo**bar**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_391() { + // https://github.github.com/gfm/#example-391 + test_identical_markdown_events!(r##"__foo bar__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_392() { + // https://github.github.com/gfm/#example-392 + test_identical_markdown_events!(r##"__ foo bar__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_393() { + // https://github.github.com/gfm/#example-393 + test_identical_markdown_events!(r##"__ +foo bar__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_394() { + // https://github.github.com/gfm/#example-394 + test_identical_markdown_events!(r##"a__"foo"__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_395() { + // https://github.github.com/gfm/#example-395 + test_identical_markdown_events!(r##"foo__bar__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_396() { + // https://github.github.com/gfm/#example-396 + test_identical_markdown_events!(r##"5__6__78"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_397() { + // https://github.github.com/gfm/#example-397 + test_identical_markdown_events!(r##"пристаням__стремятся__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_398() { + // https://github.github.com/gfm/#example-398 + test_identical_markdown_events!(r##"__foo, __bar__, baz__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_399() { + // https://github.github.com/gfm/#example-399 + test_identical_markdown_events!(r##"foo-__(bar)__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_400() { + // https://github.github.com/gfm/#example-400 + test_identical_markdown_events!(r##"**foo bar **"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_401() { + // https://github.github.com/gfm/#example-401 + test_identical_markdown_events!(r##"**(**foo)"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_402() { + // https://github.github.com/gfm/#example-402 + test_identical_markdown_events!(r##"*(**foo**)*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_403() { + // https://github.github.com/gfm/#example-403 + test_identical_markdown_events!(r##"**Gomphocarpus (*Gomphocarpus physocarpus*, syn. +*Asclepias physocarpa*)**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_404() { + // https://github.github.com/gfm/#example-404 + test_identical_markdown_events!(r##"**foo "*bar*" foo**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_405() { + // https://github.github.com/gfm/#example-405 + test_identical_markdown_events!(r##"**foo**bar"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_406() { + // https://github.github.com/gfm/#example-406 + test_identical_markdown_events!(r##"__foo bar __"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_407() { + // https://github.github.com/gfm/#example-407 + test_identical_markdown_events!(r##"__(__foo)"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_408() { + // https://github.github.com/gfm/#example-408 + test_identical_markdown_events!(r##"_(__foo__)_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_409() { + // https://github.github.com/gfm/#example-409 + test_identical_markdown_events!(r##"__foo__bar"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_410() { + // https://github.github.com/gfm/#example-410 + test_identical_markdown_events!(r##"__пристаням__стремятся"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_411() { + // https://github.github.com/gfm/#example-411 + test_identical_markdown_events!(r##"__foo__bar__baz__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_412() { + // https://github.github.com/gfm/#example-412 + test_identical_markdown_events!(r##"__(bar)__."##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_413() { + // https://github.github.com/gfm/#example-413 + test_identical_markdown_events!(r##"*foo [bar](/url)*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_414() { + // https://github.github.com/gfm/#example-414 + test_identical_markdown_events!(r##"*foo +bar*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_415() { + // https://github.github.com/gfm/#example-415 + test_identical_markdown_events!(r##"_foo __bar__ baz_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_416() { + // https://github.github.com/gfm/#example-416 + test_identical_markdown_events!(r##"_foo _bar_ baz_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_417() { + // https://github.github.com/gfm/#example-417 + test_identical_markdown_events!(r##"__foo_ bar_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_418() { + // https://github.github.com/gfm/#example-418 + test_identical_markdown_events!(r##"*foo *bar**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_419() { + // https://github.github.com/gfm/#example-419 + test_identical_markdown_events!(r##"*foo **bar** baz*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_420() { + // https://github.github.com/gfm/#example-420 + test_identical_markdown_events!(r##"*foo**bar**baz*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_421() { + // https://github.github.com/gfm/#example-421 + test_identical_markdown_events!(r##"*foo**bar*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_422() { + // https://github.github.com/gfm/#example-422 + test_identical_markdown_events!(r##"***foo** bar*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_423() { + // https://github.github.com/gfm/#example-423 + test_identical_markdown_events!(r##"*foo **bar***"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_424() { + // https://github.github.com/gfm/#example-424 + test_identical_markdown_events!(r##"*foo**bar***"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_425() { + // https://github.github.com/gfm/#example-425 + test_identical_markdown_events!(r##"foo***bar***baz"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_426() { + // https://github.github.com/gfm/#example-426 + test_identical_markdown_events!(r##"foo******bar*********baz"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_427() { + // https://github.github.com/gfm/#example-427 + test_identical_markdown_events!(r##"*foo **bar *baz* bim** bop*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_428() { + // https://github.github.com/gfm/#example-428 + test_identical_markdown_events!(r##"*foo [*bar*](/url)*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_429() { + // https://github.github.com/gfm/#example-429 + test_identical_markdown_events!(r##"** is not an empty emphasis"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_430() { + // https://github.github.com/gfm/#example-430 + test_identical_markdown_events!(r##"**** is not an empty strong emphasis"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_431() { + // https://github.github.com/gfm/#example-431 + test_identical_markdown_events!(r##"**foo [bar](/url)**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_432() { + // https://github.github.com/gfm/#example-432 + test_identical_markdown_events!(r##"**foo +bar**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_433() { + // https://github.github.com/gfm/#example-433 + test_identical_markdown_events!(r##"__foo _bar_ baz__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_434() { + // https://github.github.com/gfm/#example-434 + test_identical_markdown_events!(r##"__foo __bar__ baz__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_435() { + // https://github.github.com/gfm/#example-435 + test_identical_markdown_events!(r##"____foo__ bar__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_436() { + // https://github.github.com/gfm/#example-436 + test_identical_markdown_events!(r##"**foo **bar****"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_437() { + // https://github.github.com/gfm/#example-437 + test_identical_markdown_events!(r##"**foo *bar* baz**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_438() { + // https://github.github.com/gfm/#example-438 + test_identical_markdown_events!(r##"**foo*bar*baz**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_439() { + // https://github.github.com/gfm/#example-439 + test_identical_markdown_events!(r##"***foo* bar**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_440() { + // https://github.github.com/gfm/#example-440 + test_identical_markdown_events!(r##"**foo *bar***"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_441() { + // https://github.github.com/gfm/#example-441 + test_identical_markdown_events!(r##"**foo *bar **baz** +bim* bop**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_442() { + // https://github.github.com/gfm/#example-442 + test_identical_markdown_events!(r##"**foo [*bar*](/url)**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_443() { + // https://github.github.com/gfm/#example-443 + test_identical_markdown_events!(r##"__ is not an empty emphasis"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_444() { + // https://github.github.com/gfm/#example-444 + test_identical_markdown_events!(r##"____ is not an empty strong emphasis"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_445() { + // https://github.github.com/gfm/#example-445 + test_identical_markdown_events!(r##"foo ***"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_446() { + // https://github.github.com/gfm/#example-446 + test_identical_markdown_events!(r##"foo *\**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_447() { + // https://github.github.com/gfm/#example-447 + test_identical_markdown_events!(r##"foo *_*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_448() { + // https://github.github.com/gfm/#example-448 + test_identical_markdown_events!(r##"foo *****"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_449() { + // https://github.github.com/gfm/#example-449 + test_identical_markdown_events!(r##"foo **\***"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_450() { + // https://github.github.com/gfm/#example-450 + test_identical_markdown_events!(r##"foo **_**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_451() { + // https://github.github.com/gfm/#example-451 + test_identical_markdown_events!(r##"**foo*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_452() { + // https://github.github.com/gfm/#example-452 + test_identical_markdown_events!(r##"*foo**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_453() { + // https://github.github.com/gfm/#example-453 + test_identical_markdown_events!(r##"***foo**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_454() { + // https://github.github.com/gfm/#example-454 + test_identical_markdown_events!(r##"****foo*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_455() { + // https://github.github.com/gfm/#example-455 + test_identical_markdown_events!(r##"**foo***"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_456() { + // https://github.github.com/gfm/#example-456 + test_identical_markdown_events!(r##"*foo****"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_457() { + // https://github.github.com/gfm/#example-457 + test_identical_markdown_events!(r##"foo ___"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_458() { + // https://github.github.com/gfm/#example-458 + test_identical_markdown_events!(r##"foo _\__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_459() { + // https://github.github.com/gfm/#example-459 + test_identical_markdown_events!(r##"foo _*_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_460() { + // https://github.github.com/gfm/#example-460 + test_identical_markdown_events!(r##"foo _____"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_461() { + // https://github.github.com/gfm/#example-461 + test_identical_markdown_events!(r##"foo __\___"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_462() { + // https://github.github.com/gfm/#example-462 + test_identical_markdown_events!(r##"foo __*__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_463() { + // https://github.github.com/gfm/#example-463 + test_identical_markdown_events!(r##"__foo_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_464() { + // https://github.github.com/gfm/#example-464 + test_identical_markdown_events!(r##"_foo__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_465() { + // https://github.github.com/gfm/#example-465 + test_identical_markdown_events!(r##"___foo__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_466() { + // https://github.github.com/gfm/#example-466 + test_identical_markdown_events!(r##"____foo_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_467() { + // https://github.github.com/gfm/#example-467 + test_identical_markdown_events!(r##"__foo___"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_468() { + // https://github.github.com/gfm/#example-468 + test_identical_markdown_events!(r##"_foo____"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_469() { + // https://github.github.com/gfm/#example-469 + test_identical_markdown_events!(r##"**foo**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_470() { + // https://github.github.com/gfm/#example-470 + test_identical_markdown_events!(r##"*_foo_*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_471() { + // https://github.github.com/gfm/#example-471 + test_identical_markdown_events!(r##"__foo__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_472() { + // https://github.github.com/gfm/#example-472 + test_identical_markdown_events!(r##"_*foo*_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_473() { + // https://github.github.com/gfm/#example-473 + test_identical_markdown_events!(r##"****foo****"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_474() { + // https://github.github.com/gfm/#example-474 + test_identical_markdown_events!(r##"____foo____"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_475() { + // https://github.github.com/gfm/#example-475 + test_identical_markdown_events!(r##"******foo******"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_476() { + // https://github.github.com/gfm/#example-476 + test_identical_markdown_events!(r##"***foo***"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_477() { + // https://github.github.com/gfm/#example-477 + test_identical_markdown_events!(r##"_____foo_____"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_478() { + // https://github.github.com/gfm/#example-478 + test_identical_markdown_events!(r##"*foo _bar* baz_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_479() { + // https://github.github.com/gfm/#example-479 + test_identical_markdown_events!(r##"*foo __bar *baz bim__ bam*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_480() { + // https://github.github.com/gfm/#example-480 + test_identical_markdown_events!(r##"**foo **bar baz**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_481() { + // https://github.github.com/gfm/#example-481 + test_identical_markdown_events!(r##"*foo *bar baz*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_482() { + // https://github.github.com/gfm/#example-482 + test_identical_markdown_events!(r##"*[bar*](/url)"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_483() { + // https://github.github.com/gfm/#example-483 + test_identical_markdown_events!(r##"_foo [bar_](/url)"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_484() { + // https://github.github.com/gfm/#example-484 + test_identical_markdown_events!(r##"*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_485() { + // https://github.github.com/gfm/#example-485 + test_identical_markdown_events!(r##"**"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_486() { + // https://github.github.com/gfm/#example-486 + test_identical_markdown_events!(r##"__"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_487() { + // https://github.github.com/gfm/#example-487 + test_identical_markdown_events!(r##"*a `*`*"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_488() { + // https://github.github.com/gfm/#example-488 + test_identical_markdown_events!(r##"_a `_`_"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_489() { + // https://github.github.com/gfm/#example-489 + test_identical_markdown_events!(r##"**a"##); +} + +#[test] +fn gfm_markdown_emphasis_and_strong_emphasis_490() { + // https://github.github.com/gfm/#example-490 + test_identical_markdown_events!(r##"__a"##); +} + +#[test] +fn gfm_markdown_strikethrough_extension_491() { + // https://github.github.com/gfm/#example-491 + test_identical_markdown_events!(r##"~~Hi~~ Hello, world!"##); +} + +#[test] +fn gfm_markdown_strikethrough_extension_492() { + // https://github.github.com/gfm/#example-492 + test_identical_markdown_events!(r##"This ~~has a + +new paragraph~~."##); +} + +#[test] +fn gfm_markdown_links_493() { + // https://github.github.com/gfm/#example-493 + test_identical_markdown_events!(r##"[link](/uri "title")"##); +} + +#[test] +fn gfm_markdown_links_494() { + // https://github.github.com/gfm/#example-494 + test_identical_markdown_events!(r##"[link](/uri)"##); +} + +#[test] +fn gfm_markdown_links_495() { + // https://github.github.com/gfm/#example-495 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn gfm_markdown_links_496() { + // https://github.github.com/gfm/#example-496 + test_identical_markdown_events!(r##"[link](<>)"##,r##"[link]()"##); +} + +#[test] +fn gfm_markdown_links_497() { + // https://github.github.com/gfm/#example-497 + test_identical_markdown_events!(r##"[link](/my uri)"##); +} + +#[test] +fn gfm_markdown_links_498() { + // https://github.github.com/gfm/#example-498 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn gfm_markdown_links_499() { + // https://github.github.com/gfm/#example-499 + test_identical_markdown_events!(r##"[link](foo +bar)"##); +} + +#[test] +fn gfm_markdown_links_500() { + // https://github.github.com/gfm/#example-500 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn gfm_markdown_links_501() { + // https://github.github.com/gfm/#example-501 + test_identical_markdown_events!(r##"[a]()"##); +} + +#[test] +fn gfm_markdown_links_502() { + // https://github.github.com/gfm/#example-502 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn gfm_markdown_links_503() { + // https://github.github.com/gfm/#example-503 + test_identical_markdown_events!(r##"[a]( +[a](c)"##); +} + +#[test] +fn gfm_markdown_links_504() { + // https://github.github.com/gfm/#example-504 + test_identical_markdown_events!(r##"[link](\(foo\))"##); +} + +#[test] +fn gfm_markdown_links_505() { + // https://github.github.com/gfm/#example-505 + test_identical_markdown_events!(r##"[link](foo(and(bar)))"##); +} + +#[test] +fn gfm_markdown_links_506() { + // https://github.github.com/gfm/#example-506 + test_identical_markdown_events!(r##"[link](foo\(and\(bar\))"##); +} + +#[test] +fn gfm_markdown_links_507() { + // https://github.github.com/gfm/#example-507 + test_identical_markdown_events!(r##"[link]()"##); +} + +#[test] +fn gfm_markdown_links_508() { + // https://github.github.com/gfm/#example-508 + test_identical_markdown_events!(r##"[link](foo\)\:)"##); +} + +#[test] +fn gfm_markdown_links_509() { + // https://github.github.com/gfm/#example-509 + test_identical_markdown_events!(r##"[link](#fragment) + +[link](http://example.com#fragment) + +[link](http://example.com?foo=3#frag)"##); +} + +#[test] +fn gfm_markdown_links_510() { + // https://github.github.com/gfm/#example-510 + test_identical_markdown_events!(r##"[link](foo\bar)"##); +} + +#[test] +fn gfm_markdown_links_511() { + // https://github.github.com/gfm/#example-511 + test_identical_markdown_events!(r##"[link](foo%20bä)"##); +} + +#[test] +fn gfm_markdown_links_512() { + // https://github.github.com/gfm/#example-512 + test_identical_markdown_events!(r##"[link]("title")"##); +} + +#[test] +fn gfm_markdown_links_513() { + // https://github.github.com/gfm/#example-513 + test_identical_markdown_events!(r##"[link](/url "title") +[link](/url 'title') +[link](/url (title))"##); +} + +#[test] +fn gfm_markdown_links_514() { + // https://github.github.com/gfm/#example-514 + test_identical_markdown_events!(r##"[link](/url "title \""")"##); +} + +#[test] +fn gfm_markdown_links_515() { + // https://github.github.com/gfm/#example-515 + test!(r##"[link](/url "title")"##,r##"[link](/url "title")"##); +} + +#[test] +fn gfm_markdown_links_516() { + // https://github.github.com/gfm/#example-516 + test_identical_markdown_events!(r##"[link](/url "title "and" title")"##); +} + +#[test] +fn gfm_markdown_links_517() { + // https://github.github.com/gfm/#example-517 + test_identical_markdown_events!(r##"[link](/url 'title "and" title')"##); +} + +#[test] +fn gfm_markdown_links_518() { + // https://github.github.com/gfm/#example-518 + test_identical_markdown_events!(r##"[link]( /uri + "title" )"##,r##"[link](/uri "title")"##); +} + +#[test] +fn gfm_markdown_links_519() { + // https://github.github.com/gfm/#example-519 + test_identical_markdown_events!(r##"[link] (/uri)"##); +} + +#[test] +fn gfm_markdown_links_520() { + // https://github.github.com/gfm/#example-520 + test_identical_markdown_events!(r##"[link [foo [bar]]](/uri)"##); +} + +#[test] +fn gfm_markdown_links_521() { + // https://github.github.com/gfm/#example-521 + test_identical_markdown_events!(r##"[link] bar](/uri)"##); +} + +#[test] +fn gfm_markdown_links_522() { + // https://github.github.com/gfm/#example-522 + test_identical_markdown_events!(r##"[link [bar](/uri)"##); +} + +#[test] +fn gfm_markdown_links_523() { + // https://github.github.com/gfm/#example-523 + test_identical_markdown_events!(r##"[link \[bar](/uri)"##); +} + +#[test] +fn gfm_markdown_links_524() { + // https://github.github.com/gfm/#example-524 + test_identical_markdown_events!(r##"[link *foo **bar** `#`*](/uri)"##); +} + +#[test] +fn gfm_markdown_links_525() { + // https://github.github.com/gfm/#example-525 + test_identical_markdown_events!(r##"[![moon](moon.jpg)](/uri)"##); +} + +#[test] +fn gfm_markdown_links_526() { + // https://github.github.com/gfm/#example-526 + test_identical_markdown_events!(r##"[foo [bar](/uri)](/uri)"##); +} + +#[test] +fn gfm_markdown_links_527() { + // https://github.github.com/gfm/#example-527 + test_identical_markdown_events!(r##"[foo *[bar [baz](/uri)](/uri)*](/uri)"##); +} + +#[test] +fn gfm_markdown_links_528() { + // https://github.github.com/gfm/#example-528 + test_identical_markdown_events!(r##"![[[foo](uri1)](uri2)](uri3)"##); +} + +#[test] +fn gfm_markdown_links_529() { + // https://github.github.com/gfm/#example-529 + test_identical_markdown_events!(r##"*[foo*](/uri)"##); +} + +#[test] +fn gfm_markdown_links_530() { + // https://github.github.com/gfm/#example-530 + test_identical_markdown_events!(r##"[foo *bar](baz*)"##); +} + +#[test] +fn gfm_markdown_links_531() { + // https://github.github.com/gfm/#example-531 + test_identical_markdown_events!(r##"*foo [bar* baz]"##); +} + +#[test] +fn gfm_markdown_links_532() { + // https://github.github.com/gfm/#example-532 + test_identical_markdown_events!(r##"[foo "##); +} + +#[test] +fn gfm_markdown_links_533() { + // https://github.github.com/gfm/#example-533 + test_identical_markdown_events!(r##"[foo`](/uri)`"##); +} + +#[test] +fn gfm_markdown_links_534() { + // https://github.github.com/gfm/#example-534 + test_identical_markdown_events!(r##"[foo"##); +} + +#[test] +fn gfm_markdown_links_535() { + // https://github.github.com/gfm/#example-535 + test_identical_markdown_events!(r##"[foo][bar] + +[bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_536() { + // https://github.github.com/gfm/#example-536 + test_identical_markdown_events!(r##"[link [foo [bar]]][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_537() { + // https://github.github.com/gfm/#example-537 + test_identical_markdown_events!(r##"[link \[bar][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_538() { + // https://github.github.com/gfm/#example-538 + test_identical_markdown_events!(r##"[link *foo **bar** `#`*][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_539() { + // https://github.github.com/gfm/#example-539 + test_identical_markdown_events!(r##"[![moon](moon.jpg)][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_540() { + // https://github.github.com/gfm/#example-540 + test_identical_markdown_events!(r##"[foo [bar](/uri)][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_541() { + // https://github.github.com/gfm/#example-541 + test_identical_markdown_events!(r##"[foo *bar [baz][ref]*][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_542() { + // https://github.github.com/gfm/#example-542 + test_identical_markdown_events!(r##"*[foo*][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_543() { + // https://github.github.com/gfm/#example-543 + test_identical_markdown_events!(r##"[foo *bar][ref] + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_544() { + // https://github.github.com/gfm/#example-544 + test_identical_markdown_events!(r##"[foo + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_545() { + // https://github.github.com/gfm/#example-545 + test_identical_markdown_events!(r##"[foo`][ref]` + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_546() { + // https://github.github.com/gfm/#example-546 + test_identical_markdown_events!(r##"[foo + +[ref]: /uri"##); +} + +#[test] +fn gfm_markdown_links_547() { + // https://github.github.com/gfm/#example-547 + test_identical_markdown_events!(r##"[foo][BaR] + +[bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_548() { + // https://github.github.com/gfm/#example-548 + test_identical_markdown_events!(r##"[Толпой][Толпой] is a Russian word. + +[ТОЛПОЙ]: /url"##); +} + +#[test] +fn gfm_markdown_links_549() { + // https://github.github.com/gfm/#example-549 + test_identical_markdown_events!(r##"[Foo + bar]: /url + +[Baz][Foo bar]"##,r##"[Foo bar]: /url + +[Baz][Foo bar]"##); +} + +#[test] +fn gfm_markdown_links_550() { + // https://github.github.com/gfm/#example-550 + test_identical_markdown_events!(r##"[foo] [bar] + +[bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_551() { + // https://github.github.com/gfm/#example-551 + test_identical_markdown_events!(r##"[foo] +[bar] + +[bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_552() { + // https://github.github.com/gfm/#example-552 + test_identical_markdown_events!(r##"[foo]: /url1 + +[foo]: /url2 + +[bar][foo]"##,r##"[foo]: /url1 + + + +[bar][foo]"##); +} + +#[test] +fn gfm_markdown_links_553() { + // https://github.github.com/gfm/#example-553 + test_identical_markdown_events!(r##"[bar][foo\!] + +[foo!]: /url"##); +} + +#[test] +fn gfm_markdown_links_554() { + // https://github.github.com/gfm/#example-554 + test_identical_markdown_events!(r##"[foo][ref[] + +[ref[]: /uri"##); +} + +#[test] +fn gfm_markdown_links_555() { + // https://github.github.com/gfm/#example-555 + test_identical_markdown_events!(r##"[foo][ref[bar]] + +[ref[bar]]: /uri"##); +} + +#[test] +fn gfm_markdown_links_556() { + // https://github.github.com/gfm/#example-556 + test_identical_markdown_events!(r##"[[[foo]]] + +[[[foo]]]: /url"##); +} + +#[test] +fn gfm_markdown_links_557() { + // https://github.github.com/gfm/#example-557 + test_identical_markdown_events!(r##"[foo][ref\[] + +[ref\[]: /uri"##); +} + +#[test] +fn gfm_markdown_links_558() { + // https://github.github.com/gfm/#example-558 + test_identical_markdown_events!(r##"[bar\\]: /uri + +[bar\\]"##); +} + +#[test] +fn gfm_markdown_links_559() { + // https://github.github.com/gfm/#example-559 + test_identical_markdown_events!(r##"[] + +[]: /uri"##); +} + +#[test] +fn gfm_markdown_links_560() { + // https://github.github.com/gfm/#example-560 + test_identical_markdown_events!(r##"[ + ] + +[ + ]: /uri"##,r##"[ +] + +[ +]: /uri"##); +} + +#[test] +fn gfm_markdown_links_561() { + // https://github.github.com/gfm/#example-561 + test_identical_markdown_events!(r##"[foo][] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_562() { + // https://github.github.com/gfm/#example-562 + test_identical_markdown_events!(r##"[*foo* bar][] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_563() { + // https://github.github.com/gfm/#example-563 + test_identical_markdown_events!(r##"[Foo][] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_564() { + // https://github.github.com/gfm/#example-564 + test_identical_markdown_events!("[foo] \n[]\n\n[foo]: /url \"title\""); +} + +#[test] +fn gfm_markdown_links_565() { + // https://github.github.com/gfm/#example-565 + test_identical_markdown_events!(r##"[foo] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_566() { + // https://github.github.com/gfm/#example-566 + test_identical_markdown_events!(r##"[*foo* bar] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_567() { + // https://github.github.com/gfm/#example-567 + test_identical_markdown_events!(r##"[[*foo* bar]] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_568() { + // https://github.github.com/gfm/#example-568 + test_identical_markdown_events!(r##"[[bar [foo] + +[foo]: /url"##); +} + +#[test] +fn gfm_markdown_links_569() { + // https://github.github.com/gfm/#example-569 + test_identical_markdown_events!(r##"[Foo] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_570() { + // https://github.github.com/gfm/#example-570 + test_identical_markdown_events!(r##"[foo] bar + +[foo]: /url"##); +} + +#[test] +fn gfm_markdown_links_571() { + // https://github.github.com/gfm/#example-571 + test_identical_markdown_events!(r##"\[foo] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_links_572() { + // https://github.github.com/gfm/#example-572 + test_identical_markdown_events!(r##"[foo*]: /url + +*[foo*]"##); +} + +#[test] +fn gfm_markdown_links_573() { + // https://github.github.com/gfm/#example-573 + test_identical_markdown_events!(r##"[foo][bar] + +[foo]: /url1 +[bar]: /url2"##); +} + +#[test] +fn gfm_markdown_links_574() { + // https://github.github.com/gfm/#example-574 + test_identical_markdown_events!(r##"[foo][] + +[foo]: /url1"##); +} + +#[test] +fn gfm_markdown_links_575() { + // https://github.github.com/gfm/#example-575 + test_identical_markdown_events!(r##"[foo]() + +[foo]: /url1"##); +} + +#[test] +fn gfm_markdown_links_576() { + // https://github.github.com/gfm/#example-576 + test_identical_markdown_events!(r##"[foo](not a link) + +[foo]: /url1"##); +} + +#[test] +fn gfm_markdown_links_577() { + // https://github.github.com/gfm/#example-577 + test_identical_markdown_events!(r##"[foo][bar][baz] + +[baz]: /url"##); +} + +#[test] +fn gfm_markdown_links_578() { + // https://github.github.com/gfm/#example-578 + test_identical_markdown_events!(r##"[foo][bar][baz] + +[baz]: /url1 +[bar]: /url2"##); +} + +#[test] +fn gfm_markdown_links_579() { + // https://github.github.com/gfm/#example-579 + test_identical_markdown_events!(r##"[foo][bar][baz] + +[baz]: /url1 +[foo]: /url2"##); +} + +#[test] +fn gfm_markdown_images_580() { + // https://github.github.com/gfm/#example-580 + test_identical_markdown_events!(r##"![foo](/url "title")"##); +} + +#[test] +fn gfm_markdown_images_581() { + // https://github.github.com/gfm/#example-581 + test_identical_markdown_events!(r##"![foo *bar*] + +[foo *bar*]: train.jpg "train & tracks""##); +} + +#[test] +fn gfm_markdown_images_582() { + // https://github.github.com/gfm/#example-582 + test_identical_markdown_events!(r##"![foo ![bar](/url)](/url2)"##); +} + +#[test] +fn gfm_markdown_images_583() { + // https://github.github.com/gfm/#example-583 + test_identical_markdown_events!(r##"![foo [bar](/url)](/url2)"##); +} + +#[test] +fn gfm_markdown_images_584() { + // https://github.github.com/gfm/#example-584 + test_identical_markdown_events!(r##"![foo *bar*][] + +[foo *bar*]: train.jpg "train & tracks""##); +} + +#[test] +fn gfm_markdown_images_585() { + // https://github.github.com/gfm/#example-585 + test_identical_markdown_events!(r##"![foo *bar*][foobar] + +[FOOBAR]: train.jpg "train & tracks""##); +} + +#[test] +fn gfm_markdown_images_586() { + // https://github.github.com/gfm/#example-586 + test_identical_markdown_events!(r##"![foo](train.jpg)"##); +} + +#[test] +fn gfm_markdown_images_587() { + // https://github.github.com/gfm/#example-587 + test_identical_markdown_events!(r##"My ![foo bar](/path/to/train.jpg "title" )"##,r##"My ![foo bar](/path/to/train.jpg "title")"##); +} + +#[test] +fn gfm_markdown_images_588() { + // https://github.github.com/gfm/#example-588 + test_identical_markdown_events!(r##"![foo]()"##,r##"![foo](url)"##); +} + +#[test] +fn gfm_markdown_images_589() { + // https://github.github.com/gfm/#example-589 + test_identical_markdown_events!(r##"![](/url)"##); +} + +#[test] +fn gfm_markdown_images_590() { + // https://github.github.com/gfm/#example-590 + test_identical_markdown_events!(r##"![foo][bar] + +[bar]: /url"##); +} + +#[test] +fn gfm_markdown_images_591() { + // https://github.github.com/gfm/#example-591 + test_identical_markdown_events!(r##"![foo][bar] + +[BAR]: /url"##); +} + +#[test] +fn gfm_markdown_images_592() { + // https://github.github.com/gfm/#example-592 + test_identical_markdown_events!(r##"![foo][] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_593() { + // https://github.github.com/gfm/#example-593 + test_identical_markdown_events!(r##"![*foo* bar][] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_594() { + // https://github.github.com/gfm/#example-594 + test_identical_markdown_events!(r##"![Foo][] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_595() { + // https://github.github.com/gfm/#example-595 + test_identical_markdown_events!("![foo] \n[]\n\n[foo]: /url \"title\""); +} + +#[test] +fn gfm_markdown_images_596() { + // https://github.github.com/gfm/#example-596 + test_identical_markdown_events!(r##"![foo] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_597() { + // https://github.github.com/gfm/#example-597 + test_identical_markdown_events!(r##"![*foo* bar] + +[*foo* bar]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_598() { + // https://github.github.com/gfm/#example-598 + test_identical_markdown_events!(r##"![[foo]] + +[[foo]]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_599() { + // https://github.github.com/gfm/#example-599 + test_identical_markdown_events!(r##"![Foo] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_600() { + // https://github.github.com/gfm/#example-600 + test_identical_markdown_events!(r##"!\[foo] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_images_601() { + // https://github.github.com/gfm/#example-601 + test_identical_markdown_events!(r##"\![foo] + +[foo]: /url "title""##); +} + +#[test] +fn gfm_markdown_autolinks_602() { + // https://github.github.com/gfm/#example-602 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_603() { + // https://github.github.com/gfm/#example-603 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_604() { + // https://github.github.com/gfm/#example-604 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_605() { + // https://github.github.com/gfm/#example-605 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_606() { + // https://github.github.com/gfm/#example-606 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_607() { + // https://github.github.com/gfm/#example-607 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_608() { + // https://github.github.com/gfm/#example-608 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_609() { + // https://github.github.com/gfm/#example-609 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_610() { + // https://github.github.com/gfm/#example-610 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_611() { + // https://github.github.com/gfm/#example-611 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_612() { + // https://github.github.com/gfm/#example-612 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_613() { + // https://github.github.com/gfm/#example-613 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_614() { + // https://github.github.com/gfm/#example-614 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_615() { + // https://github.github.com/gfm/#example-615 + test_identical_markdown_events!(r##"<>"##); +} + +#[test] +fn gfm_markdown_autolinks_616() { + // https://github.github.com/gfm/#example-616 + test_identical_markdown_events!(r##"< http://foo.bar >"##); +} + +#[test] +fn gfm_markdown_autolinks_617() { + // https://github.github.com/gfm/#example-617 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_618() { + // https://github.github.com/gfm/#example-618 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_autolinks_619() { + // https://github.github.com/gfm/#example-619 + test_identical_markdown_events!(r##"http://example.com"##); +} + +#[test] +fn gfm_markdown_autolinks_620() { + // https://github.github.com/gfm/#example-620 + test_identical_markdown_events!(r##"foo@bar.example.com"##); +} + +#[test] +fn gfm_markdown_autolinks_extension_621() { + // https://github.github.com/gfm/#example-621 + test_identical_markdown_events!(r##"www.commonmark.org"##); +} + +#[test] +fn gfm_markdown_autolinks_extension_622() { + // https://github.github.com/gfm/#example-622 + test_identical_markdown_events!(r##"Visit www.commonmark.org/help for more information."##); +} + +#[test] +fn gfm_markdown_autolinks_extension_623() { + // https://github.github.com/gfm/#example-623 + test_identical_markdown_events!(r##"Visit www.commonmark.org. + +Visit www.commonmark.org/a.b."##); +} + +#[test] +fn gfm_markdown_autolinks_extension_624() { + // https://github.github.com/gfm/#example-624 + test_identical_markdown_events!(r##"www.google.com/search?q=Markup+(business) + +www.google.com/search?q=Markup+(business))) + +(www.google.com/search?q=Markup+(business)) + +(www.google.com/search?q=Markup+(business)"##); +} + +#[test] +fn gfm_markdown_autolinks_extension_625() { + // https://github.github.com/gfm/#example-625 + test_identical_markdown_events!(r##"www.google.com/search?q=(business))+ok"##); +} + +#[test] +fn gfm_markdown_autolinks_extension_626() { + // https://github.github.com/gfm/#example-626 + test_identical_markdown_events!(r##"www.google.com/search?q=commonmark&hl=en + +www.google.com/search?q=commonmark&hl;"##); +} + +#[test] +fn gfm_markdown_autolinks_extension_627() { + // https://github.github.com/gfm/#example-627 + test_identical_markdown_events!(r##"www.commonmark.org/he"##); +} + +#[test] +fn gfm_markdown_raw_html_633() { + // https://github.github.com/gfm/#example-633 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_raw_html_634() { + // https://github.github.com/gfm/#example-634 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_raw_html_635() { + // https://github.github.com/gfm/#example-635 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_raw_html_636() { + // https://github.github.com/gfm/#example-636 + test_identical_markdown_events!(r##"Foo "##); +} + +#[test] +fn gfm_markdown_raw_html_637() { + // https://github.github.com/gfm/#example-637 + test_identical_markdown_events!(r##"<33> <__>"##); +} + +#[test] +fn gfm_markdown_raw_html_638() { + // https://github.github.com/gfm/#example-638 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_raw_html_639() { + // https://github.github.com/gfm/#example-639 + test_identical_markdown_events!(r##"< +foo> +"##); +} + +#[test] +fn gfm_markdown_raw_html_641() { + // https://github.github.com/gfm/#example-641 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_raw_html_642() { + // https://github.github.com/gfm/#example-642 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_raw_html_643() { + // https://github.github.com/gfm/#example-643 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_raw_html_644() { + // https://github.github.com/gfm/#example-644 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn gfm_markdown_raw_html_645() { + // https://github.github.com/gfm/#example-645 + test_identical_markdown_events!(r##"foo foo --> + +foo foo -->"##); +} + +#[test] +fn gfm_markdown_raw_html_646() { + // https://github.github.com/gfm/#example-646 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn gfm_markdown_raw_html_647() { + // https://github.github.com/gfm/#example-647 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn gfm_markdown_raw_html_648() { + // https://github.github.com/gfm/#example-648 + test_identical_markdown_events!(r##"foo &<]]>"##); +} + +#[test] +fn gfm_markdown_raw_html_649() { + // https://github.github.com/gfm/#example-649 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn gfm_markdown_raw_html_650() { + // https://github.github.com/gfm/#example-650 + test_identical_markdown_events!(r##"foo "##); +} + +#[test] +fn gfm_markdown_raw_html_651() { + // https://github.github.com/gfm/#example-651 + test_identical_markdown_events!(r##""##); +} + +#[test] +fn gfm_markdown_disallowed_raw_html_extension_652() { + // https://github.github.com/gfm/#example-652 + test_identical_markdown_events!(r##" <style> <em> + +<blockquote> + <xmp> is disallowed. <XMP> is also disallowed. +</blockquote>"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_653() { + // https://github.github.com/gfm/#example-653 + test_identical_markdown_events!("foo \nbaz"); +} + +#[test] +fn gfm_markdown_hard_line_breaks_654() { + // https://github.github.com/gfm/#example-654 + test_identical_markdown_events!(r##"foo\ +baz"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_655() { + // https://github.github.com/gfm/#example-655 + test_identical_markdown_events!("foo \nbaz"); +} + +#[test] +fn gfm_markdown_hard_line_breaks_656() { + // https://github.github.com/gfm/#example-656 + test_identical_markdown_events!("foo \n bar","foo \nbar"); +} + +#[test] +fn gfm_markdown_hard_line_breaks_657() { + // https://github.github.com/gfm/#example-657 + test_identical_markdown_events!(r##"foo\ + bar"##,r##"foo\ +bar"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_658() { + // https://github.github.com/gfm/#example-658 + test_identical_markdown_events!("*foo \nbar*"); +} + +#[test] +fn gfm_markdown_hard_line_breaks_659() { + // https://github.github.com/gfm/#example-659 + test_identical_markdown_events!(r##"*foo\ +bar*"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_660() { + // https://github.github.com/gfm/#example-660 + test_identical_markdown_events!("`code \nspan`"); +} + +#[test] +fn gfm_markdown_hard_line_breaks_661() { + // https://github.github.com/gfm/#example-661 + test_identical_markdown_events!(r##"`code\ +span`"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_662() { + // https://github.github.com/gfm/#example-662 + test_identical_markdown_events!("<a href=\"foo \nbar\">"); +} + +#[test] +fn gfm_markdown_hard_line_breaks_663() { + // https://github.github.com/gfm/#example-663 + test_identical_markdown_events!(r##"<a href="foo\ +bar">"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_664() { + // https://github.github.com/gfm/#example-664 + test_identical_markdown_events!(r##"foo\"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_665() { + // https://github.github.com/gfm/#example-665 + test_identical_markdown_events!("foo "); +} + +#[test] +fn gfm_markdown_hard_line_breaks_666() { + // https://github.github.com/gfm/#example-666 + test_identical_markdown_events!(r##"### foo\"##); +} + +#[test] +fn gfm_markdown_hard_line_breaks_667() { + // https://github.github.com/gfm/#example-667 + test_identical_markdown_events!("### foo ",r##"### foo"##); +} + +#[test] +fn gfm_markdown_soft_line_breaks_668() { + // https://github.github.com/gfm/#example-668 + test_identical_markdown_events!(r##"foo +baz"##); +} + +#[test] +fn gfm_markdown_soft_line_breaks_669() { + // https://github.github.com/gfm/#example-669 + test_identical_markdown_events!("foo \n baz","foo \nbaz"); +} + +#[test] +fn gfm_markdown_textual_content_670() { + // https://github.github.com/gfm/#example-670 + test_identical_markdown_events!(r##"hello $.;'there"##); +} + +#[test] +fn gfm_markdown_textual_content_671() { + // https://github.github.com/gfm/#example-671 + test_identical_markdown_events!(r##"Foo χρῆν"##); +} + +#[test] +fn gfm_markdown_textual_content_672() { + // https://github.github.com/gfm/#example-672 + test_identical_markdown_events!(r##"Multiple spaces"##); +} diff --git a/markdown/tests/spec/commonmark_v0_30_spec.json b/markdown/tests/spec/commonmark_v0_30_spec.json new file mode 100644 index 00000000000..9710113a190 --- /dev/null +++ b/markdown/tests/spec/commonmark_v0_30_spec.json @@ -0,0 +1,5384 @@ +[ + { + "markdown": "\tfoo\tbaz\t\tbim\n", + "formattedMarkdown": " foo\tbaz\t\tbim", + "html": "<pre><code>foo\tbaz\t\tbim\n</code></pre>\n", + "example": 1, + "start_line": 356, + "end_line": 361, + "section": "Tabs" + }, + { + "markdown": " \tfoo\tbaz\t\tbim\n", + "formattedMarkdown": " foo\tbaz\t\tbim", + "html": "<pre><code>foo\tbaz\t\tbim\n</code></pre>\n", + "example": 2, + "start_line": 363, + "end_line": 368, + "section": "Tabs" + }, + { + "markdown": " a\ta\n ὐ\ta\n", + "html": "<pre><code>a\ta\nὐ\ta\n</code></pre>\n", + "example": 3, + "start_line": 370, + "end_line": 377, + "section": "Tabs" + }, + { + "markdown": " - foo\n\n\tbar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 4, + "start_line": 383, + "end_line": 394, + "section": "Tabs" + }, + { + "markdown": "- foo\n\n\t\tbar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<pre><code> bar\n</code></pre>\n</li>\n</ul>\n", + "example": 5, + "start_line": 396, + "end_line": 408, + "section": "Tabs" + }, + { + "markdown": ">\t\tfoo\n", + "formattedMarkdown": "> foo", + "html": "<blockquote>\n<pre><code> foo\n</code></pre>\n</blockquote>\n", + "example": 6, + "start_line": 419, + "end_line": 426, + "section": "Tabs" + }, + { + "markdown": "-\t\tfoo\n", + "formattedMarkdown": "- foo", + "html": "<ul>\n<li>\n<pre><code> foo\n</code></pre>\n</li>\n</ul>\n", + "example": 7, + "start_line": 428, + "end_line": 437, + "section": "Tabs" + }, + { + "markdown": " foo\n\tbar\n", + "formattedMarkdown": " foo\n bar", + "html": "<pre><code>foo\nbar\n</code></pre>\n", + "example": 8, + "start_line": 440, + "end_line": 447, + "section": "Tabs" + }, + { + "markdown": " - foo\n - bar\n\t - baz\n", + "formattedMarkdown": "- foo\n - bar\n - baz", + "html": "<ul>\n<li>foo\n<ul>\n<li>bar\n<ul>\n<li>baz</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n", + "example": 9, + "start_line": 449, + "end_line": 465, + "section": "Tabs" + }, + { + "markdown": "#\tFoo\n", + "formattedMarkdown": "# Foo", + "html": "<h1>Foo</h1>\n", + "example": 10, + "start_line": 467, + "end_line": 471, + "section": "Tabs" + }, + { + "markdown": "*\t*\t*\t\n", + "html": "<hr />\n", + "example": 11, + "start_line": 473, + "end_line": 477, + "section": "Tabs" + }, + { + "markdown": "\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~\n", + "html": "<p>!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~</p>\n", + "example": 12, + "start_line": 490, + "end_line": 494, + "section": "Backslash escapes" + }, + { + "markdown": "\\\t\\A\\a\\ \\3\\φ\\«\n", + "html": "<p>\\\t\\A\\a\\ \\3\\φ\\«</p>\n", + "example": 13, + "start_line": 500, + "end_line": 504, + "section": "Backslash escapes" + }, + { + "markdown": "\\*not emphasized*\n\\<br/> not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n\\ö not a character entity\n", + "html": "<p>*not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"\n&ouml; not a character entity</p>\n", + "example": 14, + "start_line": 510, + "end_line": 530, + "section": "Backslash escapes" + }, + { + "markdown": "\\\\*emphasis*\n", + "html": "<p>\\<em>emphasis</em></p>\n", + "example": 15, + "start_line": 535, + "end_line": 539, + "section": "Backslash escapes" + }, + { + "markdown": "foo\\\nbar\n", + "html": "<p>foo<br />\nbar</p>\n", + "example": 16, + "start_line": 544, + "end_line": 550, + "section": "Backslash escapes" + }, + { + "markdown": "`` \\[\\` ``\n", + "html": "<p><code>\\[\\`</code></p>\n", + "example": 17, + "start_line": 556, + "end_line": 560, + "section": "Backslash escapes" + }, + { + "markdown": " \\[\\]\n", + "html": "<pre><code>\\[\\]\n</code></pre>\n", + "example": 18, + "start_line": 563, + "end_line": 568, + "section": "Backslash escapes" + }, + { + "markdown": "~~~\n\\[\\]\n~~~\n", + "html": "<pre><code>\\[\\]\n</code></pre>\n", + "example": 19, + "start_line": 571, + "end_line": 578, + "section": "Backslash escapes" + }, + { + "markdown": "<http://example.com?find=\\*>\n", + "html": "<p><a href=\"http://example.com?find=%5C*\">http://example.com?find=\\*</a></p>\n", + "example": 20, + "start_line": 581, + "end_line": 585, + "section": "Backslash escapes" + }, + { + "markdown": "<a href=\"/bar\\/)\">\n", + "html": "<a href=\"/bar\\/)\">\n", + "example": 21, + "start_line": 588, + "end_line": 592, + "section": "Backslash escapes" + }, + { + "markdown": "[foo](/bar\\* \"ti\\*tle\")\n", + "formattedMarkdown": "[foo](/bar\\* \"ti\\*tle\")", + "html": "<p><a href=\"/bar*\" title=\"ti*tle\">foo</a></p>\n", + "example": 22, + "start_line": 598, + "end_line": 602, + "section": "Backslash escapes" + }, + { + "markdown": "[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"\n", + "formattedMarkdown": "[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"", + "html": "<p><a href=\"/bar*\" title=\"ti*tle\">foo</a></p>\n", + "example": 23, + "start_line": 605, + "end_line": 611, + "section": "Backslash escapes" + }, + { + "markdown": "``` foo\\+bar\nfoo\n```\n", + "html": "<pre><code class=\"language-foo+bar\">foo\n</code></pre>\n", + "example": 24, + "start_line": 614, + "end_line": 621, + "section": "Backslash escapes" + }, + { + "markdown": "  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸\n", + "formattedMarkdown": "  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸", + "html": "<p>  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸</p>\n", + "example": 25, + "start_line": 650, + "end_line": 658, + "section": "Entity and numeric character references" + }, + { + "markdown": "# Ӓ Ϡ �\n", + "formattedMarkdown": "# Ӓ Ϡ �", + "html": "<p># Ӓ Ϡ �</p>\n", + "example": 26, + "start_line": 669, + "end_line": 673, + "section": "Entity and numeric character references" + }, + { + "markdown": "" ആ ಫ\n", + "formattedMarkdown": "" ആ ಫ", + "html": "<p>" ആ ಫ</p>\n", + "example": 27, + "start_line": 682, + "end_line": 686, + "section": "Entity and numeric character references" + }, + { + "markdown": "  &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?;\n", + "html": "<p>&nbsp &x; &#; &#x;\n&#87654321;\n&#abcdef0;\n&ThisIsNotDefined; &hi?;</p>\n", + "example": 28, + "start_line": 691, + "end_line": 701, + "section": "Entity and numeric character references" + }, + { + "markdown": "©\n", + "html": "<p>&copy</p>\n", + "example": 29, + "start_line": 708, + "end_line": 712, + "section": "Entity and numeric character references" + }, + { + "markdown": "&MadeUpEntity;\n", + "html": "<p>&MadeUpEntity;</p>\n", + "example": 30, + "start_line": 718, + "end_line": 722, + "section": "Entity and numeric character references" + }, + { + "markdown": "<a href=\"öö.html\">\n", + "html": "<a href=\"öö.html\">\n", + "example": 31, + "start_line": 729, + "end_line": 733, + "section": "Entity and numeric character references" + }, + { + "markdown": "[foo](/föö \"föö\")\n", + "formattedMarkdown": "[foo](/föö \"föö\")", + "html": "<p><a href=\"/f%C3%B6%C3%B6\" title=\"föö\">foo</a></p>\n", + "example": 32, + "start_line": 736, + "end_line": 740, + "section": "Entity and numeric character references" + }, + { + "markdown": "[foo]\n\n[foo]: /föö \"föö\"\n", + "formattedMarkdown": "[foo]\n\n[foo]: /föö \"föö\"", + "html": "<p><a href=\"/f%C3%B6%C3%B6\" title=\"föö\">foo</a></p>\n", + "example": 33, + "start_line": 743, + "end_line": 749, + "section": "Entity and numeric character references" + }, + { + "markdown": "``` föö\nfoo\n```\n", + "html": "<pre><code class=\"language-föö\">foo\n</code></pre>\n", + "example": 34, + "start_line": 752, + "end_line": 759, + "section": "Entity and numeric character references" + }, + { + "markdown": "`föö`\n", + "html": "<p><code>f&ouml;&ouml;</code></p>\n", + "example": 35, + "start_line": 765, + "end_line": 769, + "section": "Entity and numeric character references" + }, + { + "markdown": " föfö\n", + "html": "<pre><code>f&ouml;f&ouml;\n</code></pre>\n", + "example": 36, + "start_line": 772, + "end_line": 777, + "section": "Entity and numeric character references" + }, + { + "markdown": "*foo*\n*foo*\n", + "formattedMarkdown": "*foo*\n*foo*", + "html": "<p>*foo*\n<em>foo</em></p>\n", + "example": 37, + "start_line": 784, + "end_line": 790, + "section": "Entity and numeric character references" + }, + { + "markdown": "* foo\n\n* foo\n", + "formattedMarkdown": "* foo\n\n* foo", + "html": "<p>* foo</p>\n<ul>\n<li>foo</li>\n</ul>\n", + "example": 38, + "start_line": 792, + "end_line": 801, + "section": "Entity and numeric character references" + }, + { + "markdown": "foo bar\n", + "formattedMarkdown": "foo bar", + "html": "<p>foo\n\nbar</p>\n", + "example": 39, + "start_line": 803, + "end_line": 809, + "section": "Entity and numeric character references" + }, + { + "markdown": " foo\n", + "formattedMarkdown": " foo", + "html": "<p>\tfoo</p>\n", + "example": 40, + "start_line": 811, + "end_line": 815, + "section": "Entity and numeric character references" + }, + { + "markdown": "[a](url "tit")\n", + "formattedMarkdown": "[a](url "tit")", + "html": "<p>[a](url "tit")</p>\n", + "example": 41, + "start_line": 818, + "end_line": 822, + "section": "Entity and numeric character references" + }, + { + "markdown": "- `one\n- two`\n", + "html": "<ul>\n<li>`one</li>\n<li>two`</li>\n</ul>\n", + "example": 42, + "start_line": 841, + "end_line": 849, + "section": "Precedence" + }, + { + "markdown": "***\n---\n___\n", + "html": "<hr />\n<hr />\n<hr />\n", + "example": 43, + "start_line": 880, + "end_line": 888, + "section": "Thematic breaks" + }, + { + "markdown": "+++\n", + "html": "<p>+++</p>\n", + "example": 44, + "start_line": 893, + "end_line": 897, + "section": "Thematic breaks" + }, + { + "markdown": "===\n", + "html": "<p>===</p>\n", + "example": 45, + "start_line": 900, + "end_line": 904, + "section": "Thematic breaks" + }, + { + "markdown": "--\n**\n__\n", + "formattedMarkdown": "--\n**\n__", + "html": "<p>--\n**\n__</p>\n", + "example": 46, + "start_line": 909, + "end_line": 917, + "section": "Thematic breaks" + }, + { + "markdown": " ***\n ***\n ***\n", + "formattedMarkdown": "***\n***\n***", + "html": "<hr />\n<hr />\n<hr />\n", + "example": 47, + "start_line": 922, + "end_line": 930, + "section": "Thematic breaks" + }, + { + "markdown": " ***\n", + "html": "<pre><code>***\n</code></pre>\n", + "example": 48, + "start_line": 935, + "end_line": 940, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n ***\n", + "formattedMarkdown": "Foo\n\\***", + "html": "<p>Foo\n***</p>\n", + "example": 49, + "start_line": 943, + "end_line": 949, + "section": "Thematic breaks", + "testMacro": "test" + }, + { + "markdown": "_____________________________________\n", + "html": "<hr />\n", + "example": 50, + "start_line": 954, + "end_line": 958, + "section": "Thematic breaks" + }, + { + "markdown": " - - -\n", + "formattedMarkdown": "- - -", + "html": "<hr />\n", + "example": 51, + "start_line": 963, + "end_line": 967, + "section": "Thematic breaks" + }, + { + "markdown": " ** * ** * ** * **\n", + "formattedMarkdown": "** * ** * ** * **", + "html": "<hr />\n", + "example": 52, + "start_line": 970, + "end_line": 974, + "section": "Thematic breaks" + }, + { + "markdown": "- - - -\n", + "html": "<hr />\n", + "example": 53, + "start_line": 977, + "end_line": 981, + "section": "Thematic breaks" + }, + { + "markdown": "- - - - \n", + "html": "<hr />\n", + "example": 54, + "start_line": 986, + "end_line": 990, + "section": "Thematic breaks" + }, + { + "markdown": "_ _ _ _ a\n\na------\n\n---a---\n", + "html": "<p>_ _ _ _ a</p>\n<p>a------</p>\n<p>---a---</p>\n", + "example": 55, + "start_line": 995, + "end_line": 1005, + "section": "Thematic breaks" + }, + { + "markdown": " *-*\n", + "formattedMarkdown": "*-*", + "html": "<p><em>-</em></p>\n", + "example": 56, + "start_line": 1011, + "end_line": 1015, + "section": "Thematic breaks" + }, + { + "markdown": "- foo\n***\n- bar\n", + "html": "<ul>\n<li>foo</li>\n</ul>\n<hr />\n<ul>\n<li>bar</li>\n</ul>\n", + "example": 57, + "start_line": 1020, + "end_line": 1032, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n***\nbar\n", + "html": "<p>Foo</p>\n<hr />\n<p>bar</p>\n", + "example": 58, + "start_line": 1037, + "end_line": 1045, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n---\nbar\n", + "html": "<h2>Foo</h2>\n<p>bar</p>\n", + "example": 59, + "start_line": 1054, + "end_line": 1061, + "section": "Thematic breaks" + }, + { + "markdown": "* Foo\n* * *\n* Bar\n", + "html": "<ul>\n<li>Foo</li>\n</ul>\n<hr />\n<ul>\n<li>Bar</li>\n</ul>\n", + "example": 60, + "start_line": 1067, + "end_line": 1079, + "section": "Thematic breaks" + }, + { + "markdown": "- Foo\n- * * *\n", + "html": "<ul>\n<li>Foo</li>\n<li>\n<hr />\n</li>\n</ul>\n", + "example": 61, + "start_line": 1084, + "end_line": 1094, + "section": "Thematic breaks" + }, + { + "markdown": "# foo\n## foo\n### foo\n#### foo\n##### foo\n###### foo\n", + "html": "<h1>foo</h1>\n<h2>foo</h2>\n<h3>foo</h3>\n<h4>foo</h4>\n<h5>foo</h5>\n<h6>foo</h6>\n", + "example": 62, + "start_line": 1113, + "end_line": 1127, + "section": "ATX headings" + }, + { + "markdown": "####### foo\n", + "html": "<p>####### foo</p>\n", + "example": 63, + "start_line": 1132, + "end_line": 1136, + "section": "ATX headings" + }, + { + "markdown": "#5 bolt\n\n#hashtag\n", + "html": "<p>#5 bolt</p>\n<p>#hashtag</p>\n", + "example": 64, + "start_line": 1147, + "end_line": 1154, + "section": "ATX headings" + }, + { + "markdown": "\\## foo\n", + "html": "<p>## foo</p>\n", + "example": 65, + "start_line": 1159, + "end_line": 1163, + "section": "ATX headings" + }, + { + "markdown": "# foo *bar* \\*baz\\*\n", + "html": "<h1>foo <em>bar</em> *baz*</h1>\n", + "example": 66, + "start_line": 1168, + "end_line": 1172, + "section": "ATX headings" + }, + { + "markdown": "# foo \n", + "formattedMarkdown": "# foo", + "html": "<h1>foo</h1>\n", + "example": 67, + "start_line": 1177, + "end_line": 1181, + "section": "ATX headings" + }, + { + "markdown": " ### foo\n ## foo\n # foo\n", + "formattedMarkdown": "### foo\n## foo\n# foo", + "html": "<h3>foo</h3>\n<h2>foo</h2>\n<h1>foo</h1>\n", + "example": 68, + "start_line": 1186, + "end_line": 1194, + "section": "ATX headings" + }, + { + "markdown": " # foo\n", + "html": "<pre><code># foo\n</code></pre>\n", + "example": 69, + "start_line": 1199, + "end_line": 1204, + "section": "ATX headings" + }, + { + "markdown": "foo\n # bar\n", + "formattedMarkdown": "foo\n\\# bar", + "html": "<p>foo\n# bar</p>\n", + "example": 70, + "start_line": 1207, + "end_line": 1213, + "section": "ATX headings" + }, + { + "markdown": "## foo ##\n ### bar ###\n", + "formattedMarkdown": "## foo\n### bar", + "html": "<h2>foo</h2>\n<h3>bar</h3>\n", + "example": 71, + "start_line": 1218, + "end_line": 1224, + "section": "ATX headings" + }, + { + "markdown": "# foo ##################################\n##### foo ##\n", + "formattedMarkdown": "# foo\n##### foo", + "html": "<h1>foo</h1>\n<h5>foo</h5>\n", + "example": 72, + "start_line": 1229, + "end_line": 1235, + "section": "ATX headings" + }, + { + "markdown": "### foo ### \n", + "formattedMarkdown": "### foo", + "html": "<h3>foo</h3>\n", + "example": 73, + "start_line": 1240, + "end_line": 1244, + "section": "ATX headings" + }, + { + "markdown": "### foo ### b\n", + "html": "<h3>foo ### b</h3>\n", + "example": 74, + "start_line": 1251, + "end_line": 1255, + "section": "ATX headings" + }, + { + "markdown": "# foo#\n", + "html": "<h1>foo#</h1>\n", + "example": 75, + "start_line": 1260, + "end_line": 1264, + "section": "ATX headings" + }, + { + "markdown": "### foo \\###\n## foo #\\##\n# foo \\#\n", + "html": "<h3>foo ###</h3>\n<h2>foo ###</h2>\n<h1>foo #</h1>\n", + "example": 76, + "start_line": 1270, + "end_line": 1278, + "section": "ATX headings" + }, + { + "markdown": "****\n## foo\n****\n", + "html": "<hr />\n<h2>foo</h2>\n<hr />\n", + "example": 77, + "start_line": 1284, + "end_line": 1292, + "section": "ATX headings" + }, + { + "markdown": "Foo bar\n# baz\nBar foo\n", + "html": "<p>Foo bar</p>\n<h1>baz</h1>\n<p>Bar foo</p>\n", + "example": 78, + "start_line": 1295, + "end_line": 1303, + "section": "ATX headings" + }, + { + "markdown": "## \n#\n### ###\n", + "formattedMarkdown": "##\n#\n###", + "html": "<h2></h2>\n<h1></h1>\n<h3></h3>\n", + "example": 79, + "start_line": 1308, + "end_line": 1316, + "section": "ATX headings" + }, + { + "markdown": "Foo *bar*\n=========\n\nFoo *bar*\n---------\n", + "html": "<h1>Foo <em>bar</em></h1>\n<h2>Foo <em>bar</em></h2>\n", + "example": 80, + "start_line": 1351, + "end_line": 1360, + "section": "Setext headings" + }, + { + "markdown": "Foo *bar\nbaz*\n====\n", + "html": "<h1>Foo <em>bar\nbaz</em></h1>\n", + "example": 81, + "start_line": 1365, + "end_line": 1372, + "section": "Setext headings" + }, + { + "markdown": " Foo *bar\nbaz*\t\n====\n", + "formattedMarkdown": "Foo *bar\nbaz*\n====", + "html": "<h1>Foo <em>bar\nbaz</em></h1>\n", + "example": 82, + "start_line": 1379, + "end_line": 1386, + "section": "Setext headings" + }, + { + "markdown": "Foo\n-------------------------\n\nFoo\n=\n", + "html": "<h2>Foo</h2>\n<h1>Foo</h1>\n", + "example": 83, + "start_line": 1391, + "end_line": 1400, + "section": "Setext headings" + }, + { + "markdown": " Foo\n---\n\n Foo\n-----\n\n Foo\n ===\n", + "formattedMarkdown": "Foo\n---\n\nFoo\n-----\n\nFoo\n===", + "html": "<h2>Foo</h2>\n<h2>Foo</h2>\n<h1>Foo</h1>\n", + "example": 84, + "start_line": 1406, + "end_line": 1419, + "section": "Setext headings" + }, + { + "markdown": " Foo\n ---\n\n Foo\n---\n", + "html": "<pre><code>Foo\n---\n\nFoo\n</code></pre>\n<hr />\n", + "example": 85, + "start_line": 1424, + "end_line": 1437, + "section": "Setext headings" + }, + { + "markdown": "Foo\n ---- \n", + "formattedMarkdown": "Foo\n----", + "html": "<h2>Foo</h2>\n", + "example": 86, + "start_line": 1443, + "end_line": 1448, + "section": "Setext headings" + }, + { + "markdown": "Foo\n ---\n", + "formattedMarkdown": "Foo\n\\---", + "html": "<p>Foo\n---</p>\n", + "example": 87, + "start_line": 1453, + "end_line": 1459, + "section": "Setext headings" + }, + { + "markdown": "Foo\n= =\n\nFoo\n--- -\n", + "html": "<p>Foo\n= =</p>\n<p>Foo</p>\n<hr />\n", + "example": 88, + "start_line": 1464, + "end_line": 1475, + "section": "Setext headings" + }, + { + "markdown": "Foo \n-----\n", + "formattedMarkdown": "Foo\n-----", + "html": "<h2>Foo</h2>\n", + "example": 89, + "start_line": 1480, + "end_line": 1485, + "section": "Setext headings" + }, + { + "markdown": "Foo\\\n----\n", + "html": "<h2>Foo\\</h2>\n", + "example": 90, + "start_line": 1490, + "end_line": 1495, + "section": "Setext headings" + }, + { + "markdown": "`Foo\n----\n`\n\n<a title=\"a lot\n---\nof dashes\"/>\n", + "html": "<h2>`Foo</h2>\n<p>`</p>\n<h2><a title="a lot</h2>\n<p>of dashes"/></p>\n", + "example": 91, + "start_line": 1501, + "end_line": 1514, + "section": "Setext headings" + }, + { + "markdown": "> Foo\n---\n", + "html": "<blockquote>\n<p>Foo</p>\n</blockquote>\n<hr />\n", + "example": 92, + "start_line": 1520, + "end_line": 1528, + "section": "Setext headings" + }, + { + "markdown": "> foo\nbar\n===\n", + "formattedMarkdown": "> foo\n> bar\n> \\===", + "html": "<blockquote>\n<p>foo\nbar\n===</p>\n</blockquote>\n", + "example": 93, + "start_line": 1531, + "end_line": 1541, + "section": "Setext headings" + }, + { + "markdown": "- Foo\n---\n", + "html": "<ul>\n<li>Foo</li>\n</ul>\n<hr />\n", + "example": 94, + "start_line": 1544, + "end_line": 1552, + "section": "Setext headings" + }, + { + "markdown": "Foo\nBar\n---\n", + "html": "<h2>Foo\nBar</h2>\n", + "example": 95, + "start_line": 1559, + "end_line": 1566, + "section": "Setext headings" + }, + { + "markdown": "---\nFoo\n---\nBar\n---\nBaz\n", + "html": "<hr />\n<h2>Foo</h2>\n<h2>Bar</h2>\n<p>Baz</p>\n", + "example": 96, + "start_line": 1572, + "end_line": 1584, + "section": "Setext headings" + }, + { + "markdown": "\n====\n", + "formattedMarkdown": "====", + "html": "<p>====</p>\n", + "example": 97, + "start_line": 1589, + "end_line": 1594, + "section": "Setext headings" + }, + { + "markdown": "---\n---\n", + "html": "<hr />\n<hr />\n", + "example": 98, + "start_line": 1601, + "end_line": 1607, + "section": "Setext headings" + }, + { + "markdown": "- foo\n-----\n", + "html": "<ul>\n<li>foo</li>\n</ul>\n<hr />\n", + "example": 99, + "start_line": 1610, + "end_line": 1618, + "section": "Setext headings" + }, + { + "markdown": " foo\n---\n", + "html": "<pre><code>foo\n</code></pre>\n<hr />\n", + "example": 100, + "start_line": 1621, + "end_line": 1628, + "section": "Setext headings" + }, + { + "markdown": "> foo\n-----\n", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n<hr />\n", + "example": 101, + "start_line": 1631, + "end_line": 1639, + "section": "Setext headings" + }, + { + "markdown": "\\> foo\n------\n", + "html": "<h2>> foo</h2>\n", + "example": 102, + "start_line": 1645, + "end_line": 1650, + "section": "Setext headings" + }, + { + "markdown": "Foo\n\nbar\n---\nbaz\n", + "html": "<p>Foo</p>\n<h2>bar</h2>\n<p>baz</p>\n", + "example": 103, + "start_line": 1676, + "end_line": 1686, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\n---\n\nbaz\n", + "html": "<p>Foo\nbar</p>\n<hr />\n<p>baz</p>\n", + "example": 104, + "start_line": 1692, + "end_line": 1704, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n* * *\nbaz\n", + "html": "<p>Foo\nbar</p>\n<hr />\n<p>baz</p>\n", + "example": 105, + "start_line": 1710, + "end_line": 1720, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\\---\nbaz\n", + "html": "<p>Foo\nbar\n---\nbaz</p>\n", + "example": 106, + "start_line": 1725, + "end_line": 1735, + "section": "Setext headings" + }, + { + "markdown": " a simple\n indented code block\n", + "html": "<pre><code>a simple\n indented code block\n</code></pre>\n", + "example": 107, + "start_line": 1753, + "end_line": 1760, + "section": "Indented code blocks" + }, + { + "markdown": " - foo\n\n bar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 108, + "start_line": 1767, + "end_line": 1778, + "section": "Indented code blocks" + }, + { + "markdown": "1. foo\n\n - bar\n", + "formattedMarkdown": "1. foo\n\n - bar", + "html": "<ol>\n<li>\n<p>foo</p>\n<ul>\n<li>bar</li>\n</ul>\n</li>\n</ol>\n", + "example": 109, + "start_line": 1781, + "end_line": 1794, + "section": "Indented code blocks" + }, + { + "markdown": " <a/>\n *hi*\n\n - one\n", + "html": "<pre><code><a/>\n*hi*\n\n- one\n</code></pre>\n", + "example": 110, + "start_line": 1801, + "end_line": 1812, + "section": "Indented code blocks" + }, + { + "markdown": " chunk1\n\n chunk2\n \n \n \n chunk3\n", + "formattedMarkdown": " chunk1\n\n chunk2\n\n\n\n chunk3", + "html": "<pre><code>chunk1\n\nchunk2\n\n\n\nchunk3\n</code></pre>\n", + "example": 111, + "start_line": 1817, + "end_line": 1834, + "section": "Indented code blocks" + }, + { + "markdown": " chunk1\n \n chunk2\n", + "formattedMarkdown": " chunk1\n\n chunk2", + "html": "<pre><code>chunk1\n \n chunk2\n</code></pre>\n", + "example": 112, + "start_line": 1840, + "end_line": 1849, + "section": "Indented code blocks" + }, + { + "markdown": "Foo\n bar\n\n", + "formattedMarkdown": "Foo\nbar", + "html": "<p>Foo\nbar</p>\n", + "example": 113, + "start_line": 1855, + "end_line": 1862, + "section": "Indented code blocks" + }, + { + "markdown": " foo\nbar\n", + "html": "<pre><code>foo\n</code></pre>\n<p>bar</p>\n", + "example": 114, + "start_line": 1869, + "end_line": 1876, + "section": "Indented code blocks" + }, + { + "markdown": "# Heading\n foo\nHeading\n------\n foo\n----\n", + "html": "<h1>Heading</h1>\n<pre><code>foo\n</code></pre>\n<h2>Heading</h2>\n<pre><code>foo\n</code></pre>\n<hr />\n", + "example": 115, + "start_line": 1882, + "end_line": 1897, + "section": "Indented code blocks" + }, + { + "markdown": " foo\n bar\n", + "html": "<pre><code> foo\nbar\n</code></pre>\n", + "example": 116, + "start_line": 1902, + "end_line": 1909, + "section": "Indented code blocks" + }, + { + "markdown": "\n \n foo\n \n\n", + "formattedMarkdown": " foo", + "html": "<pre><code>foo\n</code></pre>\n", + "example": 117, + "start_line": 1915, + "end_line": 1924, + "section": "Indented code blocks" + }, + { + "markdown": " foo \n", + "formattedMarkdown": " foo", + "html": "<pre><code>foo \n</code></pre>\n", + "example": 118, + "start_line": 1929, + "end_line": 1934, + "section": "Indented code blocks" + }, + { + "markdown": "```\n<\n >\n```\n", + "html": "<pre><code><\n >\n</code></pre>\n", + "example": 119, + "start_line": 1984, + "end_line": 1993, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~\n<\n >\n~~~\n", + "html": "<pre><code><\n >\n</code></pre>\n", + "example": 120, + "start_line": 1998, + "end_line": 2007, + "section": "Fenced code blocks" + }, + { + "markdown": "``\nfoo\n``\n", + "html": "<p><code>foo</code></p>\n", + "example": 121, + "start_line": 2011, + "end_line": 2017, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n~~~\n```\n", + "html": "<pre><code>aaa\n~~~\n</code></pre>\n", + "example": 122, + "start_line": 2022, + "end_line": 2031, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~\naaa\n```\n~~~\n", + "html": "<pre><code>aaa\n```\n</code></pre>\n", + "example": 123, + "start_line": 2034, + "end_line": 2043, + "section": "Fenced code blocks" + }, + { + "markdown": "````\naaa\n```\n``````\n", + "formattedMarkdown": "````\naaa\n```\n````", + "html": "<pre><code>aaa\n```\n</code></pre>\n", + "example": 124, + "start_line": 2048, + "end_line": 2057, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~\naaa\n~~~\n~~~~\n", + "html": "<pre><code>aaa\n~~~\n</code></pre>\n", + "example": 125, + "start_line": 2060, + "end_line": 2069, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n", + "formattedMarkdown": "```\n```", + "html": "<pre><code></code></pre>\n", + "example": 126, + "start_line": 2075, + "end_line": 2079, + "section": "Fenced code blocks" + }, + { + "markdown": "`````\n\n```\naaa\n", + "formattedMarkdown": "`````\n\n```\naaa\n`````", + "html": "<pre><code>\n```\naaa\n</code></pre>\n", + "example": 127, + "start_line": 2082, + "end_line": 2092, + "section": "Fenced code blocks", + "testMacro": "test" + }, + { + "markdown": "> ```\n> aaa\n\nbbb\n", + "formattedMarkdown": "> ```\n> aaa\n> ```\n\nbbb", + "html": "<blockquote>\n<pre><code>aaa\n</code></pre>\n</blockquote>\n<p>bbb</p>\n", + "example": 128, + "start_line": 2095, + "end_line": 2106, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n\n \n```\n", + "formattedMarkdown": "```\n```", + "html": "<pre><code>\n \n</code></pre>\n", + "example": 129, + "start_line": 2111, + "end_line": 2120, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n```\n", + "html": "<pre><code></code></pre>\n", + "example": 130, + "start_line": 2125, + "end_line": 2130, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\n aaa\naaa\n```\n", + "formattedMarkdown": "```\naaa\naaa\n```", + "html": "<pre><code>aaa\naaa\n</code></pre>\n", + "example": 131, + "start_line": 2137, + "end_line": 2146, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\naaa\n aaa\naaa\n ```\n", + "formattedMarkdown": "```\naaa\naaa\naaa\n```", + "html": "<pre><code>aaa\naaa\naaa\n</code></pre>\n", + "example": 132, + "start_line": 2149, + "end_line": 2160, + "section": "Fenced code blocks", + "testMacro": "test" + }, + { + "markdown": " ```\n aaa\n aaa\n aaa\n ```\n", + "formattedMarkdown": "```\naaa\n aaa\naaa\n```", + "html": "<pre><code>aaa\n aaa\naaa\n</code></pre>\n", + "example": 133, + "start_line": 2163, + "end_line": 2174, + "section": "Fenced code blocks", + "testMacro": "test" + }, + { + "markdown": " ```\n aaa\n ```\n", + "html": "<pre><code>```\naaa\n```\n</code></pre>\n", + "example": 134, + "start_line": 2179, + "end_line": 2188, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n ```\n", + "formattedMarkdown": "```\naaa\n```", + "html": "<pre><code>aaa\n</code></pre>\n", + "example": 135, + "start_line": 2194, + "end_line": 2201, + "section": "Fenced code blocks" + }, + { + "markdown": " ```\naaa\n ```\n", + "formattedMarkdown": "```\naaa\n```", + "html": "<pre><code>aaa\n</code></pre>\n", + "example": 136, + "start_line": 2204, + "end_line": 2211, + "section": "Fenced code blocks" + }, + { + "markdown": "```\naaa\n ```\n", + "formattedMarkdown": "```\naaa\n ```\n```", + "html": "<pre><code>aaa\n ```\n</code></pre>\n", + "example": 137, + "start_line": 2216, + "end_line": 2224, + "section": "Fenced code blocks", + "testMacro": "test" + }, + { + "markdown": "``` ```\naaa\n", + "html": "<p><code> </code>\naaa</p>\n", + "example": 138, + "start_line": 2230, + "end_line": 2236, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~~~\naaa\n~~~ ~~\n", + "formattedMarkdown": "~~~~~~\naaa\n~~~ ~~\n~~~~~~", + "html": "<pre><code>aaa\n~~~ ~~\n</code></pre>\n", + "example": 139, + "start_line": 2239, + "end_line": 2247, + "section": "Fenced code blocks", + "testMacro": "test" + }, + { + "markdown": "foo\n```\nbar\n```\nbaz\n", + "html": "<p>foo</p>\n<pre><code>bar\n</code></pre>\n<p>baz</p>\n", + "example": 140, + "start_line": 2253, + "end_line": 2264, + "section": "Fenced code blocks" + }, + { + "markdown": "foo\n---\n~~~\nbar\n~~~\n# baz\n", + "html": "<h2>foo</h2>\n<pre><code>bar\n</code></pre>\n<h1>baz</h1>\n", + "example": 141, + "start_line": 2270, + "end_line": 2282, + "section": "Fenced code blocks" + }, + { + "markdown": "```ruby\ndef foo(x)\n return 3\nend\n```\n", + "html": "<pre><code class=\"language-ruby\">def foo(x)\n return 3\nend\n</code></pre>\n", + "example": 142, + "start_line": 2292, + "end_line": 2303, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~\n", + "formattedMarkdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~", + "html": "<pre><code class=\"language-ruby\">def foo(x)\n return 3\nend\n</code></pre>\n", + "example": 143, + "start_line": 2306, + "end_line": 2317, + "section": "Fenced code blocks" + }, + { + "markdown": "````;\n````\n", + "html": "<pre><code class=\"language-;\"></code></pre>\n", + "example": 144, + "start_line": 2320, + "end_line": 2325, + "section": "Fenced code blocks" + }, + { + "markdown": "``` aa ```\nfoo\n", + "html": "<p><code>aa</code>\nfoo</p>\n", + "example": 145, + "start_line": 2330, + "end_line": 2336, + "section": "Fenced code blocks" + }, + { + "markdown": "~~~ aa ``` ~~~\nfoo\n~~~\n", + "html": "<pre><code class=\"language-aa\">foo\n</code></pre>\n", + "example": 146, + "start_line": 2341, + "end_line": 2348, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n``` aaa\n```\n", + "html": "<pre><code>``` aaa\n</code></pre>\n", + "example": 147, + "start_line": 2353, + "end_line": 2360, + "section": "Fenced code blocks" + }, + { + "markdown": "<table><tr><td>\n<pre>\n**Hello**,\n\n_world_.\n</pre>\n</td></tr></table>\n", + "html": "<table><tr><td>\n<pre>\n**Hello**,\n<p><em>world</em>.\n</pre></p>\n</td></tr></table>\n", + "example": 148, + "start_line": 2432, + "end_line": 2447, + "section": "HTML blocks" + }, + { + "markdown": "<table>\n <tr>\n <td>\n hi\n </td>\n </tr>\n</table>\n\nokay.\n", + "html": "<table>\n <tr>\n <td>\n hi\n </td>\n </tr>\n</table>\n<p>okay.</p>\n", + "example": 149, + "start_line": 2461, + "end_line": 2480, + "section": "HTML blocks" + }, + { + "markdown": " <div>\n *hello*\n <foo><a>\n", + "formattedMarkdown": "<div>\n *hello*\n <foo><a>", + "html": " <div>\n *hello*\n <foo><a>\n", + "example": 150, + "start_line": 2483, + "end_line": 2491, + "section": "HTML blocks" + }, + { + "markdown": "</div>\n*foo*\n", + "html": "</div>\n*foo*\n", + "example": 151, + "start_line": 2496, + "end_line": 2502, + "section": "HTML blocks" + }, + { + "markdown": "<DIV CLASS=\"foo\">\n\n*Markdown*\n\n</DIV>\n", + "html": "<DIV CLASS=\"foo\">\n<p><em>Markdown</em></p>\n</DIV>\n", + "example": 152, + "start_line": 2507, + "end_line": 2517, + "section": "HTML blocks" + }, + { + "markdown": "<div id=\"foo\"\n class=\"bar\">\n</div>\n", + "html": "<div id=\"foo\"\n class=\"bar\">\n</div>\n", + "example": 153, + "start_line": 2523, + "end_line": 2531, + "section": "HTML blocks" + }, + { + "markdown": "<div id=\"foo\" class=\"bar\n baz\">\n</div>\n", + "html": "<div id=\"foo\" class=\"bar\n baz\">\n</div>\n", + "example": 154, + "start_line": 2534, + "end_line": 2542, + "section": "HTML blocks" + }, + { + "markdown": "<div>\n*foo*\n\n*bar*\n", + "html": "<div>\n*foo*\n<p><em>bar</em></p>\n", + "example": 155, + "start_line": 2546, + "end_line": 2555, + "section": "HTML blocks" + }, + { + "markdown": "<div id=\"foo\"\n*hi*\n", + "html": "<div id=\"foo\"\n*hi*\n", + "example": 156, + "start_line": 2562, + "end_line": 2568, + "section": "HTML blocks" + }, + { + "markdown": "<div class\nfoo\n", + "html": "<div class\nfoo\n", + "example": 157, + "start_line": 2571, + "end_line": 2577, + "section": "HTML blocks" + }, + { + "markdown": "<div *???-&&&-<---\n*foo*\n", + "html": "<div *???-&&&-<---\n*foo*\n", + "example": 158, + "start_line": 2583, + "end_line": 2589, + "section": "HTML blocks" + }, + { + "markdown": "<div><a href=\"bar\">*foo*</a></div>\n", + "html": "<div><a href=\"bar\">*foo*</a></div>\n", + "example": 159, + "start_line": 2595, + "end_line": 2599, + "section": "HTML blocks" + }, + { + "markdown": "<table><tr><td>\nfoo\n</td></tr></table>\n", + "html": "<table><tr><td>\nfoo\n</td></tr></table>\n", + "example": 160, + "start_line": 2602, + "end_line": 2610, + "section": "HTML blocks" + }, + { + "markdown": "<div></div>\n``` c\nint x = 33;\n```\n", + "html": "<div></div>\n``` c\nint x = 33;\n```\n", + "example": 161, + "start_line": 2619, + "end_line": 2629, + "section": "HTML blocks" + }, + { + "markdown": "<a href=\"foo\">\n*bar*\n</a>\n", + "html": "<a href=\"foo\">\n*bar*\n</a>\n", + "example": 162, + "start_line": 2636, + "end_line": 2644, + "section": "HTML blocks" + }, + { + "markdown": "<Warning>\n*bar*\n</Warning>\n", + "html": "<Warning>\n*bar*\n</Warning>\n", + "example": 163, + "start_line": 2649, + "end_line": 2657, + "section": "HTML blocks" + }, + { + "markdown": "<i class=\"foo\">\n*bar*\n</i>\n", + "html": "<i class=\"foo\">\n*bar*\n</i>\n", + "example": 164, + "start_line": 2660, + "end_line": 2668, + "section": "HTML blocks" + }, + { + "markdown": "</ins>\n*bar*\n", + "html": "</ins>\n*bar*\n", + "example": 165, + "start_line": 2671, + "end_line": 2677, + "section": "HTML blocks" + }, + { + "markdown": "<del>\n*foo*\n</del>\n", + "html": "<del>\n*foo*\n</del>\n", + "example": 166, + "start_line": 2686, + "end_line": 2694, + "section": "HTML blocks" + }, + { + "markdown": "<del>\n\n*foo*\n\n</del>\n", + "html": "<del>\n<p><em>foo</em></p>\n</del>\n", + "example": 167, + "start_line": 2701, + "end_line": 2711, + "section": "HTML blocks" + }, + { + "markdown": "<del>*foo*</del>\n", + "html": "<p><del><em>foo</em></del></p>\n", + "example": 168, + "start_line": 2719, + "end_line": 2723, + "section": "HTML blocks" + }, + { + "markdown": "<pre language=\"haskell\"><code>\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n</code></pre>\nokay\n", + "html": "<pre language=\"haskell\"><code>\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n</code></pre>\n<p>okay</p>\n", + "example": 169, + "start_line": 2735, + "end_line": 2751, + "section": "HTML blocks" + }, + { + "markdown": "<script type=\"text/javascript\">\n// JavaScript example\n\ndocument.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n</script>\nokay\n", + "html": "<script type=\"text/javascript\">\n// JavaScript example\n\ndocument.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n</script>\n<p>okay</p>\n", + "example": 170, + "start_line": 2756, + "end_line": 2770, + "section": "HTML blocks" + }, + { + "markdown": "<textarea>\n\n*foo*\n\n_bar_\n\n</textarea>\n", + "html": "<textarea>\n\n*foo*\n\n_bar_\n\n</textarea>\n", + "example": 171, + "start_line": 2775, + "end_line": 2791, + "section": "HTML blocks" + }, + { + "markdown": "<style\n type=\"text/css\">\nh1 {color:red;}\n\np {color:blue;}\n</style>\nokay\n", + "html": "<style\n type=\"text/css\">\nh1 {color:red;}\n\np {color:blue;}\n</style>\n<p>okay</p>\n", + "example": 172, + "start_line": 2795, + "end_line": 2811, + "section": "HTML blocks" + }, + { + "markdown": "<style\n type=\"text/css\">\n\nfoo\n", + "html": "<style\n type=\"text/css\">\n\nfoo\n", + "example": 173, + "start_line": 2818, + "end_line": 2828, + "section": "HTML blocks" + }, + { + "markdown": "> <div>\n> foo\n\nbar\n", + "html": "<blockquote>\n<div>\nfoo\n</blockquote>\n<p>bar</p>\n", + "example": 174, + "start_line": 2831, + "end_line": 2842, + "section": "HTML blocks" + }, + { + "markdown": "- <div>\n- foo\n", + "html": "<ul>\n<li>\n<div>\n</li>\n<li>foo</li>\n</ul>\n", + "example": 175, + "start_line": 2845, + "end_line": 2855, + "section": "HTML blocks" + }, + { + "markdown": "<style>p{color:red;}</style>\n*foo*\n", + "html": "<style>p{color:red;}</style>\n<p><em>foo</em></p>\n", + "example": 176, + "start_line": 2860, + "end_line": 2866, + "section": "HTML blocks" + }, + { + "markdown": "<!-- foo -->*bar*\n*baz*\n", + "html": "<!-- foo -->*bar*\n<p><em>baz</em></p>\n", + "example": 177, + "start_line": 2869, + "end_line": 2875, + "section": "HTML blocks" + }, + { + "markdown": "<script>\nfoo\n</script>1. *bar*\n", + "html": "<script>\nfoo\n</script>1. *bar*\n", + "example": 178, + "start_line": 2881, + "end_line": 2889, + "section": "HTML blocks" + }, + { + "markdown": "<!-- Foo\n\nbar\n baz -->\nokay\n", + "html": "<!-- Foo\n\nbar\n baz -->\n<p>okay</p>\n", + "example": 179, + "start_line": 2894, + "end_line": 2906, + "section": "HTML blocks" + }, + { + "markdown": "<?php\n\n echo '>';\n\n?>\nokay\n", + "html": "<?php\n\n echo '>';\n\n?>\n<p>okay</p>\n", + "example": 180, + "start_line": 2912, + "end_line": 2926, + "section": "HTML blocks" + }, + { + "markdown": "<!DOCTYPE html>\n", + "html": "<!DOCTYPE html>\n", + "example": 181, + "start_line": 2931, + "end_line": 2935, + "section": "HTML blocks" + }, + { + "markdown": "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\nokay\n", + "html": "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\n<p>okay</p>\n", + "example": 182, + "start_line": 2940, + "end_line": 2968, + "section": "HTML blocks" + }, + { + "markdown": " <!-- foo -->\n\n <!-- foo -->\n", + "formattedMarkdown": "<!-- foo -->\n\n <!-- foo -->", + "html": " <!-- foo -->\n<pre><code><!-- foo -->\n</code></pre>\n", + "example": 183, + "start_line": 2974, + "end_line": 2982, + "section": "HTML blocks" + }, + { + "markdown": " <div>\n\n <div>\n", + "formattedMarkdown": "<div>\n\n <div>", + "html": " <div>\n<pre><code><div>\n</code></pre>\n", + "example": 184, + "start_line": 2985, + "end_line": 2993, + "section": "HTML blocks" + }, + { + "markdown": "Foo\n<div>\nbar\n</div>\n", + "html": "<p>Foo</p>\n<div>\nbar\n</div>\n", + "example": 185, + "start_line": 2999, + "end_line": 3009, + "section": "HTML blocks" + }, + { + "markdown": "<div>\nbar\n</div>\n*foo*\n", + "html": "<div>\nbar\n</div>\n*foo*\n", + "example": 186, + "start_line": 3016, + "end_line": 3026, + "section": "HTML blocks" + }, + { + "markdown": "Foo\n<a href=\"bar\">\nbaz\n", + "html": "<p>Foo\n<a href=\"bar\">\nbaz</p>\n", + "example": 187, + "start_line": 3031, + "end_line": 3039, + "section": "HTML blocks" + }, + { + "markdown": "<div>\n\n*Emphasized* text.\n\n</div>\n", + "html": "<div>\n<p><em>Emphasized</em> text.</p>\n</div>\n", + "example": 188, + "start_line": 3072, + "end_line": 3082, + "section": "HTML blocks" + }, + { + "markdown": "<div>\n*Emphasized* text.\n</div>\n", + "html": "<div>\n*Emphasized* text.\n</div>\n", + "example": 189, + "start_line": 3085, + "end_line": 3093, + "section": "HTML blocks" + }, + { + "markdown": "<table>\n\n<tr>\n\n<td>\nHi\n</td>\n\n</tr>\n\n</table>\n", + "html": "<table>\n<tr>\n<td>\nHi\n</td>\n</tr>\n</table>\n", + "example": 190, + "start_line": 3107, + "end_line": 3127, + "section": "HTML blocks" + }, + { + "markdown": "<table>\n\n <tr>\n\n <td>\n Hi\n </td>\n\n </tr>\n\n</table>\n", + "formattedMarkdown": "<table>\n\n<tr>\n\n <td>\n Hi\n </td>\n\n</tr>\n\n</table>", + "html": "<table>\n <tr>\n<pre><code><td>\n Hi\n</td>\n</code></pre>\n </tr>\n</table>\n", + "example": 191, + "start_line": 3134, + "end_line": 3155, + "section": "HTML blocks" + }, + { + "markdown": "[foo]: /url \"title\"\n\n[foo]\n", + "formattedMarkdown": "[foo]: /url \"title\"\n\n[foo]", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 192, + "start_line": 3183, + "end_line": 3189, + "section": "Link reference definitions" + }, + { + "markdown": " [foo]: \n /url \n 'the title' \n\n[foo]\n", + "formattedMarkdown": "[foo]: /url 'the title'\n\n[foo]", + "html": "<p><a href=\"/url\" title=\"the title\">foo</a></p>\n", + "example": 193, + "start_line": 3192, + "end_line": 3200, + "section": "Link reference definitions" + }, + { + "markdown": "[Foo*bar\\]]:my_(url) 'title (with parens)'\n\n[Foo*bar\\]]\n", + "formattedMarkdown": "[Foo*bar\\]]: my_(url) 'title (with parens)'\n\n[Foo*bar\\]]", + "html": "<p><a href=\"my_(url)\" title=\"title (with parens)\">Foo*bar]</a></p>\n", + "example": 194, + "start_line": 3203, + "end_line": 3209, + "section": "Link reference definitions" + }, + { + "markdown": "[Foo bar]:\n<my url>\n'title'\n\n[Foo bar]\n", + "formattedMarkdown": "[Foo bar]: <my url> 'title'\n\n[Foo bar]", + "html": "<p><a href=\"my%20url\" title=\"title\">Foo bar</a></p>\n", + "example": 195, + "start_line": 3212, + "end_line": 3220, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]\n", + "formattedMarkdown": "[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]", + "html": "<p><a href=\"/url\" title=\"\ntitle\nline1\nline2\n\">foo</a></p>\n", + "example": 196, + "start_line": 3225, + "end_line": 3239, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url 'title\n\nwith blank line'\n\n[foo]\n", + "html": "<p>[foo]: /url 'title</p>\n<p>with blank line'</p>\n<p>[foo]</p>\n", + "example": 197, + "start_line": 3244, + "end_line": 3254, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n/url\n\n[foo]\n", + "formattedMarkdown": "[foo]: /url\n\n[foo]", + "html": "<p><a href=\"/url\">foo</a></p>\n", + "example": 198, + "start_line": 3259, + "end_line": 3266, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n\n[foo]\n", + "html": "<p>[foo]:</p>\n<p>[foo]</p>\n", + "example": 199, + "start_line": 3271, + "end_line": 3278, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: <>\n\n[foo]\n", + "formattedMarkdown": "[foo]: <>\n\n[foo]", + "html": "<p><a href=\"\">foo</a></p>\n", + "example": 200, + "start_line": 3283, + "end_line": 3289, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: <bar>(baz)\n\n[foo]\n", + "html": "<p>[foo]: <bar>(baz)</p>\n<p>[foo]</p>\n", + "example": 201, + "start_line": 3294, + "end_line": 3301, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]\n", + "formattedMarkdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]", + "html": "<p><a href=\"/url%5Cbar*baz\" title=\"foo"bar\\baz\">foo</a></p>\n", + "example": 202, + "start_line": 3307, + "end_line": 3313, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n[foo]: url\n", + "html": "<p><a href=\"url\">foo</a></p>\n", + "example": 203, + "start_line": 3318, + "end_line": 3324, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n[foo]: first\n[foo]: second\n", + "formattedMarkdown": "[foo]\n\n[foo]: first", + "html": "<p><a href=\"first\">foo</a></p>\n", + "example": 204, + "start_line": 3330, + "end_line": 3337, + "section": "Link reference definitions" + }, + { + "markdown": "[FOO]: /url\n\n[Foo]\n", + "html": "<p><a href=\"/url\">Foo</a></p>\n", + "example": 205, + "start_line": 3343, + "end_line": 3349, + "section": "Link reference definitions" + }, + { + "markdown": "[ΑΓΩ]: /φου\n\n[αγω]\n", + "formattedMarkdown": "[ΑΓΩ]: /φου\n\n[αγω]", + "html": "<p><a href=\"/%CF%86%CE%BF%CF%85\">αγω</a></p>\n", + "example": 206, + "start_line": 3352, + "end_line": 3358, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n", + "html": "", + "example": 207, + "start_line": 3367, + "end_line": 3370, + "section": "Link reference definitions" + }, + { + "markdown": "[\nfoo\n]: /url\nbar\n", + "formattedMarkdown": "[ foo ]: /url\nbar", + "html": "<p>bar</p>\n", + "example": 208, + "start_line": 3375, + "end_line": 3382, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url \"title\" ok\n", + "html": "<p>[foo]: /url "title" ok</p>\n", + "example": 209, + "start_line": 3388, + "end_line": 3392, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n\"title\" ok\n", + "formattedMarkdown": "[foo]: /url \"title\"\"title\" ok", + "html": "<p>"title" ok</p>\n", + "example": 210, + "start_line": 3397, + "end_line": 3402, + "section": "Link reference definitions", + "skip": true, + "comment": "FIXME(ytmim) the \"title\" is duplcated here" + }, + { + "markdown": " [foo]: /url \"title\"\n\n[foo]\n", + "html": "<pre><code>[foo]: /url "title"\n</code></pre>\n<p>[foo]</p>\n", + "example": 211, + "start_line": 3408, + "end_line": 3416, + "section": "Link reference definitions" + }, + { + "markdown": "```\n[foo]: /url\n```\n\n[foo]\n", + "html": "<pre><code>[foo]: /url\n</code></pre>\n<p>[foo]</p>\n", + "example": 212, + "start_line": 3422, + "end_line": 3432, + "section": "Link reference definitions" + }, + { + "markdown": "Foo\n[bar]: /baz\n\n[bar]\n", + "html": "<p>Foo\n[bar]: /baz</p>\n<p>[bar]</p>\n", + "example": 213, + "start_line": 3437, + "end_line": 3446, + "section": "Link reference definitions" + }, + { + "markdown": "# [Foo]\n[foo]: /url\n> bar\n", + "html": "<h1><a href=\"/url\">Foo</a></h1>\n<blockquote>\n<p>bar</p>\n</blockquote>\n", + "example": 214, + "start_line": 3452, + "end_line": 3461, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\nbar\n===\n[foo]\n", + "html": "<h1>bar</h1>\n<p><a href=\"/url\">foo</a></p>\n", + "example": 215, + "start_line": 3463, + "end_line": 3471, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n===\n[foo]\n", + "html": "<p>===\n<a href=\"/url\">foo</a></p>\n", + "example": 216, + "start_line": 3473, + "end_line": 3480, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url\n \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]\n", + "formattedMarkdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]", + "html": "<p><a href=\"/foo-url\" title=\"foo\">foo</a>,\n<a href=\"/bar-url\" title=\"bar\">bar</a>,\n<a href=\"/baz-url\">baz</a></p>\n", + "example": 217, + "start_line": 3486, + "end_line": 3499, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n> [foo]: /url\n", + "formattedMarkdown": "[foo]\n\n>\n[foo]: /url", + "html": "<p><a href=\"/url\">foo</a></p>\n<blockquote>\n</blockquote>\n", + "example": 218, + "start_line": 3507, + "end_line": 3515, + "section": "Link reference definitions", + "testMacro": "test" + }, + { + "markdown": "aaa\n\nbbb\n", + "html": "<p>aaa</p>\n<p>bbb</p>\n", + "example": 219, + "start_line": 3529, + "end_line": 3536, + "section": "Paragraphs" + }, + { + "markdown": "aaa\nbbb\n\nccc\nddd\n", + "html": "<p>aaa\nbbb</p>\n<p>ccc\nddd</p>\n", + "example": 220, + "start_line": 3541, + "end_line": 3552, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n\n\nbbb\n", + "html": "<p>aaa</p>\n<p>bbb</p>\n", + "example": 221, + "start_line": 3557, + "end_line": 3565, + "section": "Paragraphs" + }, + { + "markdown": " aaa\n bbb\n", + "formattedMarkdown": "aaa\nbbb", + "html": "<p>aaa\nbbb</p>\n", + "example": 222, + "start_line": 3570, + "end_line": 3576, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n bbb\n ccc\n", + "formattedMarkdown": "aaa\nbbb\nccc", + "html": "<p>aaa\nbbb\nccc</p>\n", + "example": 223, + "start_line": 3582, + "end_line": 3590, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "formattedMarkdown": "aaa\nbbb", + "html": "<p>aaa\nbbb</p>\n", + "example": 224, + "start_line": 3596, + "end_line": 3602, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "html": "<pre><code>aaa\n</code></pre>\n<p>bbb</p>\n", + "example": 225, + "start_line": 3605, + "end_line": 3612, + "section": "Paragraphs" + }, + { + "markdown": "aaa \nbbb \n", + "html": "<p>aaa<br />\nbbb</p>\n", + "example": 226, + "start_line": 3619, + "end_line": 3625, + "section": "Paragraphs" + }, + { + "markdown": " \n\naaa\n \n\n# aaa\n\n \n", + "formattedMarkdown": "aaa\n\n\n# aaa", + "html": "<p>aaa</p>\n<h1>aaa</h1>\n", + "example": 227, + "start_line": 3636, + "end_line": 3648, + "section": "Blank lines" + }, + { + "markdown": "> # Foo\n> bar\n> baz\n", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 228, + "start_line": 3704, + "end_line": 3714, + "section": "Block quotes" + }, + { + "markdown": "># Foo\n>bar\n> baz\n", + "formattedMarkdown": "> # Foo\n> bar\n> baz", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 229, + "start_line": 3719, + "end_line": 3729, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "formattedMarkdown": "> # Foo\n> bar\n> baz", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 230, + "start_line": 3734, + "end_line": 3744, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "<pre><code>> # Foo\n> bar\n> baz\n</code></pre>\n", + "example": 231, + "start_line": 3749, + "end_line": 3758, + "section": "Block quotes" + }, + { + "markdown": "> # Foo\n> bar\nbaz\n", + "formattedMarkdown": "> # Foo\n> bar\n> baz", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 232, + "start_line": 3764, + "end_line": 3774, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n> foo\n", + "formattedMarkdown": "> bar\n> baz\n> foo", + "html": "<blockquote>\n<p>bar\nbaz\nfoo</p>\n</blockquote>\n", + "example": 233, + "start_line": 3780, + "end_line": 3790, + "section": "Block quotes" + }, + { + "markdown": "> foo\n---\n", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n<hr />\n", + "example": 234, + "start_line": 3804, + "end_line": 3812, + "section": "Block quotes" + }, + { + "markdown": "> - foo\n- bar\n", + "html": "<blockquote>\n<ul>\n<li>foo</li>\n</ul>\n</blockquote>\n<ul>\n<li>bar</li>\n</ul>\n", + "example": 235, + "start_line": 3824, + "end_line": 3836, + "section": "Block quotes" + }, + { + "markdown": "> foo\n bar\n", + "html": "<blockquote>\n<pre><code>foo\n</code></pre>\n</blockquote>\n<pre><code>bar\n</code></pre>\n", + "example": 236, + "start_line": 3842, + "end_line": 3852, + "section": "Block quotes" + }, + { + "markdown": "> ```\nfoo\n```\n", + "formattedMarkdown": "> ```\n>\n> ```\nfoo\n```\n```", + "html": "<blockquote>\n<pre><code></code></pre>\n</blockquote>\n<p>foo</p>\n<pre><code></code></pre>\n", + "example": 237, + "start_line": 3855, + "end_line": 3865, + "section": "Block quotes" + }, + { + "markdown": "> foo\n - bar\n", + "formattedMarkdown": "> foo\n> \\- bar", + "html": "<blockquote>\n<p>foo\n- bar</p>\n</blockquote>\n", + "example": 238, + "start_line": 3871, + "end_line": 3879, + "section": "Block quotes" + }, + { + "markdown": ">\n", + "html": "<blockquote>\n</blockquote>\n", + "example": 239, + "start_line": 3895, + "end_line": 3900, + "section": "Block quotes" + }, + { + "markdown": ">\n> \n> \n", + "formattedMarkdown": ">\n>\n>", + "html": "<blockquote>\n</blockquote>\n", + "example": 240, + "start_line": 3903, + "end_line": 3910, + "section": "Block quotes" + }, + { + "markdown": ">\n> foo\n> \n", + "formattedMarkdown": "> foo\n>", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n", + "example": 241, + "start_line": 3915, + "end_line": 3923, + "section": "Block quotes" + }, + { + "markdown": "> foo\n\n> bar\n", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n<blockquote>\n<p>bar</p>\n</blockquote>\n", + "example": 242, + "start_line": 3928, + "end_line": 3939, + "section": "Block quotes" + }, + { + "markdown": "> foo\n> bar\n", + "html": "<blockquote>\n<p>foo\nbar</p>\n</blockquote>\n", + "example": 243, + "start_line": 3950, + "end_line": 3958, + "section": "Block quotes" + }, + { + "markdown": "> foo\n>\n> bar\n", + "html": "<blockquote>\n<p>foo</p>\n<p>bar</p>\n</blockquote>\n", + "example": 244, + "start_line": 3963, + "end_line": 3972, + "section": "Block quotes" + }, + { + "markdown": "foo\n> bar\n", + "html": "<p>foo</p>\n<blockquote>\n<p>bar</p>\n</blockquote>\n", + "example": 245, + "start_line": 3977, + "end_line": 3985, + "section": "Block quotes" + }, + { + "markdown": "> aaa\n***\n> bbb\n", + "html": "<blockquote>\n<p>aaa</p>\n</blockquote>\n<hr />\n<blockquote>\n<p>bbb</p>\n</blockquote>\n", + "example": 246, + "start_line": 3991, + "end_line": 4003, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n", + "formattedMarkdown": "> bar\n> baz", + "html": "<blockquote>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 247, + "start_line": 4009, + "end_line": 4017, + "section": "Block quotes" + }, + { + "markdown": "> bar\n\nbaz\n", + "html": "<blockquote>\n<p>bar</p>\n</blockquote>\n<p>baz</p>\n", + "example": 248, + "start_line": 4020, + "end_line": 4029, + "section": "Block quotes" + }, + { + "markdown": "> bar\n>\nbaz\n", + "html": "<blockquote>\n<p>bar</p>\n</blockquote>\n<p>baz</p>\n", + "example": 249, + "start_line": 4032, + "end_line": 4041, + "section": "Block quotes" + }, + { + "markdown": "> > > foo\nbar\n", + "formattedMarkdown": "> > > foo\n> > > bar", + "html": "<blockquote>\n<blockquote>\n<blockquote>\n<p>foo\nbar</p>\n</blockquote>\n</blockquote>\n</blockquote>\n", + "example": 250, + "start_line": 4048, + "end_line": 4060, + "section": "Block quotes" + }, + { + "markdown": ">>> foo\n> bar\n>>baz\n", + "formattedMarkdown": "> > > foo\n> > > bar\n> > > baz", + "html": "<blockquote>\n<blockquote>\n<blockquote>\n<p>foo\nbar\nbaz</p>\n</blockquote>\n</blockquote>\n</blockquote>\n", + "example": 251, + "start_line": 4063, + "end_line": 4077, + "section": "Block quotes" + }, + { + "markdown": "> code\n\n> not code\n", + "formattedMarkdown": "> code\n\n> not code", + "html": "<blockquote>\n<pre><code>code\n</code></pre>\n</blockquote>\n<blockquote>\n<p>not code</p>\n</blockquote>\n", + "example": 252, + "start_line": 4085, + "end_line": 4097, + "section": "Block quotes" + }, + { + "markdown": "A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n", + "html": "<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n", + "example": 253, + "start_line": 4139, + "end_line": 4154, + "section": "List items" + }, + { + "markdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 254, + "start_line": 4161, + "end_line": 4180, + "section": "List items" + }, + { + "markdown": "- one\n\n two\n", + "formattedMarkdown": "- one\n\ntwo", + "html": "<ul>\n<li>one</li>\n</ul>\n<p>two</p>\n", + "example": 255, + "start_line": 4194, + "end_line": 4203, + "section": "List items" + }, + { + "markdown": "- one\n\n two\n", + "html": "<ul>\n<li>\n<p>one</p>\n<p>two</p>\n</li>\n</ul>\n", + "example": 256, + "start_line": 4206, + "end_line": 4217, + "section": "List items" + }, + { + "markdown": " - one\n\n two\n", + "formattedMarkdown": "- one\n<!-- Dont absorb code block into list -->\n<!-- Consider a feenced code block instead -->\n\n two", + "html": "<ul>\n<li>one</li>\n</ul>\n<pre><code> two\n</code></pre>\n", + "example": 257, + "start_line": 4220, + "end_line": 4230, + "section": "List items", + "testMacro": "test" + }, + { + "markdown": " - one\n\n two\n", + "formattedMarkdown": "- one\n\n two", + "html": "<ul>\n<li>\n<p>one</p>\n<p>two</p>\n</li>\n</ul>\n", + "example": 258, + "start_line": 4233, + "end_line": 4244, + "section": "List items" + }, + { + "markdown": " > > 1. one\n>>\n>> two\n", + "formattedMarkdown": "> > 1. one\n> >\n> > two", + "html": "<blockquote>\n<blockquote>\n<ol>\n<li>\n<p>one</p>\n<p>two</p>\n</li>\n</ol>\n</blockquote>\n</blockquote>\n", + "example": 259, + "start_line": 4255, + "end_line": 4270, + "section": "List items" + }, + { + "markdown": ">>- one\n>>\n > > two\n", + "formattedMarkdown": "> > - one\n> >\n> > two", + "html": "<blockquote>\n<blockquote>\n<ul>\n<li>one</li>\n</ul>\n<p>two</p>\n</blockquote>\n</blockquote>\n", + "example": 260, + "start_line": 4282, + "end_line": 4295, + "section": "List items" + }, + { + "markdown": "-one\n\n2.two\n", + "html": "<p>-one</p>\n<p>2.two</p>\n", + "example": 261, + "start_line": 4301, + "end_line": 4308, + "section": "List items" + }, + { + "markdown": "- foo\n\n\n bar\n", + "formattedMarkdown": "- foo\n\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 262, + "start_line": 4314, + "end_line": 4326, + "section": "List items" + }, + { + "markdown": "1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam\n", + "formattedMarkdown": "1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam", + "html": "<ol>\n<li>\n<p>foo</p>\n<pre><code>bar\n</code></pre>\n<p>baz</p>\n<blockquote>\n<p>bam</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 263, + "start_line": 4331, + "end_line": 4353, + "section": "List items" + }, + { + "markdown": "- Foo\n\n bar\n\n\n baz\n", + "html": "<ul>\n<li>\n<p>Foo</p>\n<pre><code>bar\n\n\nbaz\n</code></pre>\n</li>\n</ul>\n", + "example": 264, + "start_line": 4359, + "end_line": 4377, + "section": "List items" + }, + { + "markdown": "123456789. ok\n", + "html": "<ol start=\"123456789\">\n<li>ok</li>\n</ol>\n", + "example": 265, + "start_line": 4381, + "end_line": 4387, + "section": "List items" + }, + { + "markdown": "1234567890. not ok\n", + "html": "<p>1234567890. not ok</p>\n", + "example": 266, + "start_line": 4390, + "end_line": 4394, + "section": "List items" + }, + { + "markdown": "0. ok\n", + "html": "<ol start=\"0\">\n<li>ok</li>\n</ol>\n", + "example": 267, + "start_line": 4399, + "end_line": 4405, + "section": "List items" + }, + { + "markdown": "003. ok\n", + "html": "<ol start=\"3\">\n<li>ok</li>\n</ol>\n", + "example": 268, + "start_line": 4408, + "end_line": 4414, + "section": "List items" + }, + { + "markdown": "-1. not ok\n", + "html": "<p>-1. not ok</p>\n", + "example": 269, + "start_line": 4419, + "end_line": 4423, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "<ul>\n<li>\n<p>foo</p>\n<pre><code>bar\n</code></pre>\n</li>\n</ul>\n", + "example": 270, + "start_line": 4442, + "end_line": 4454, + "section": "List items" + }, + { + "markdown": " 10. foo\n\n bar\n", + "formattedMarkdown": "10. foo\n\n bar", + "html": "<ol start=\"10\">\n<li>\n<p>foo</p>\n<pre><code>bar\n</code></pre>\n</li>\n</ol>\n", + "example": 271, + "start_line": 4459, + "end_line": 4471, + "section": "List items" + }, + { + "markdown": " indented code\n\nparagraph\n\n more code\n", + "html": "<pre><code>indented code\n</code></pre>\n<p>paragraph</p>\n<pre><code>more code\n</code></pre>\n", + "example": 272, + "start_line": 4478, + "end_line": 4490, + "section": "List items" + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "<ol>\n<li>\n<pre><code>indented code\n</code></pre>\n<p>paragraph</p>\n<pre><code>more code\n</code></pre>\n</li>\n</ol>\n", + "example": 273, + "start_line": 4493, + "end_line": 4509, + "section": "List items" + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "<ol>\n<li>\n<pre><code> indented code\n</code></pre>\n<p>paragraph</p>\n<pre><code>more code\n</code></pre>\n</li>\n</ol>\n", + "example": 274, + "start_line": 4515, + "end_line": 4531, + "section": "List items" + }, + { + "markdown": " foo\n\nbar\n", + "formattedMarkdown": "foo\n\nbar", + "html": "<p>foo</p>\n<p>bar</p>\n", + "example": 275, + "start_line": 4542, + "end_line": 4549, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "formattedMarkdown": "- foo\n\nbar", + "html": "<ul>\n<li>foo</li>\n</ul>\n<p>bar</p>\n", + "example": 276, + "start_line": 4552, + "end_line": 4561, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 277, + "start_line": 4569, + "end_line": 4580, + "section": "List items" + }, + { + "markdown": "-\n foo\n-\n ```\n bar\n ```\n-\n baz\n", + "formattedMarkdown": "- foo\n- ```\n bar\n ```\n- baz", + "html": "<ul>\n<li>foo</li>\n<li>\n<pre><code>bar\n</code></pre>\n</li>\n<li>\n<pre><code>baz\n</code></pre>\n</li>\n</ul>\n", + "example": 278, + "start_line": 4596, + "end_line": 4617, + "section": "List items" + }, + { + "markdown": "- \n foo\n", + "formattedMarkdown": "- foo", + "html": "<ul>\n<li>foo</li>\n</ul>\n", + "example": 279, + "start_line": 4622, + "end_line": 4629, + "section": "List items" + }, + { + "markdown": "-\n\n foo\n", + "formattedMarkdown": "-\n\nfoo", + "html": "<ul>\n<li></li>\n</ul>\n<p>foo</p>\n", + "example": 280, + "start_line": 4636, + "end_line": 4645, + "section": "List items" + }, + { + "markdown": "- foo\n-\n- bar\n", + "html": "<ul>\n<li>foo</li>\n<li></li>\n<li>bar</li>\n</ul>\n", + "example": 281, + "start_line": 4650, + "end_line": 4660, + "section": "List items" + }, + { + "markdown": "- foo\n- \n- bar\n", + "formattedMarkdown": "- foo\n-\n- bar", + "html": "<ul>\n<li>foo</li>\n<li></li>\n<li>bar</li>\n</ul>\n", + "example": 282, + "start_line": 4665, + "end_line": 4675, + "section": "List items" + }, + { + "markdown": "1. foo\n2.\n3. bar\n", + "html": "<ol>\n<li>foo</li>\n<li></li>\n<li>bar</li>\n</ol>\n", + "example": 283, + "start_line": 4680, + "end_line": 4690, + "section": "List items" + }, + { + "markdown": "*\n", + "html": "<ul>\n<li></li>\n</ul>\n", + "example": 284, + "start_line": 4695, + "end_line": 4701, + "section": "List items" + }, + { + "markdown": "foo\n*\n\nfoo\n1.\n", + "html": "<p>foo\n*</p>\n<p>foo\n1.</p>\n", + "example": 285, + "start_line": 4705, + "end_line": 4716, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 286, + "start_line": 4727, + "end_line": 4746, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 287, + "start_line": 4751, + "end_line": 4770, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 288, + "start_line": 4775, + "end_line": 4794, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "<pre><code>1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n</code></pre>\n", + "example": 289, + "start_line": 4799, + "end_line": 4814, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 290, + "start_line": 4829, + "end_line": 4848, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.", + "html": "<ol>\n<li>A paragraph\nwith two lines.</li>\n</ol>\n", + "example": 291, + "start_line": 4853, + "end_line": 4861, + "section": "List items" + }, + { + "markdown": "> 1. > Blockquote\ncontinued here.\n", + "formattedMarkdown": "> 1. > Blockquote\n> > continued here.", + "html": "<blockquote>\n<ol>\n<li>\n<blockquote>\n<p>Blockquote\ncontinued here.</p>\n</blockquote>\n</li>\n</ol>\n</blockquote>\n", + "example": 292, + "start_line": 4866, + "end_line": 4880, + "section": "List items" + }, + { + "markdown": "> 1. > Blockquote\n> continued here.\n", + "formattedMarkdown": "> 1. > Blockquote\n> > continued here.", + "html": "<blockquote>\n<ol>\n<li>\n<blockquote>\n<p>Blockquote\ncontinued here.</p>\n</blockquote>\n</li>\n</ol>\n</blockquote>\n", + "example": 293, + "start_line": 4883, + "end_line": 4897, + "section": "List items" + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "html": "<ul>\n<li>foo\n<ul>\n<li>bar\n<ul>\n<li>baz\n<ul>\n<li>boo</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n", + "example": 294, + "start_line": 4911, + "end_line": 4932, + "section": "List items" + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "formattedMarkdown": "- foo\n- bar\n- baz\n- boo", + "html": "<ul>\n<li>foo</li>\n<li>bar</li>\n<li>baz</li>\n<li>boo</li>\n</ul>\n", + "example": 295, + "start_line": 4937, + "end_line": 4949, + "section": "List items" + }, + { + "markdown": "10) foo\n - bar\n", + "html": "<ol start=\"10\">\n<li>foo\n<ul>\n<li>bar</li>\n</ul>\n</li>\n</ol>\n", + "example": 296, + "start_line": 4954, + "end_line": 4965, + "section": "List items" + }, + { + "markdown": "10) foo\n - bar\n", + "formattedMarkdown": "10) foo\n- bar", + "html": "<ol start=\"10\">\n<li>foo</li>\n</ol>\n<ul>\n<li>bar</li>\n</ul>\n", + "example": 297, + "start_line": 4970, + "end_line": 4980, + "section": "List items" + }, + { + "markdown": "- - foo\n", + "html": "<ul>\n<li>\n<ul>\n<li>foo</li>\n</ul>\n</li>\n</ul>\n", + "example": 298, + "start_line": 4985, + "end_line": 4995, + "section": "List items" + }, + { + "markdown": "1. - 2. foo\n", + "html": "<ol>\n<li>\n<ul>\n<li>\n<ol start=\"2\">\n<li>foo</li>\n</ol>\n</li>\n</ul>\n</li>\n</ol>\n", + "example": 299, + "start_line": 4998, + "end_line": 5012, + "section": "List items" + }, + { + "markdown": "- # Foo\n- Bar\n ---\n baz\n", + "html": "<ul>\n<li>\n<h1>Foo</h1>\n</li>\n<li>\n<h2>Bar</h2>\nbaz</li>\n</ul>\n", + "example": 300, + "start_line": 5017, + "end_line": 5031, + "section": "List items" + }, + { + "markdown": "- foo\n- bar\n+ baz\n", + "html": "<ul>\n<li>foo</li>\n<li>bar</li>\n</ul>\n<ul>\n<li>baz</li>\n</ul>\n", + "example": 301, + "start_line": 5253, + "end_line": 5265, + "section": "Lists" + }, + { + "markdown": "1. foo\n2. bar\n3) baz\n", + "html": "<ol>\n<li>foo</li>\n<li>bar</li>\n</ol>\n<ol start=\"3\">\n<li>baz</li>\n</ol>\n", + "example": 302, + "start_line": 5268, + "end_line": 5280, + "section": "Lists" + }, + { + "markdown": "Foo\n- bar\n- baz\n", + "html": "<p>Foo</p>\n<ul>\n<li>bar</li>\n<li>baz</li>\n</ul>\n", + "example": 303, + "start_line": 5287, + "end_line": 5297, + "section": "Lists" + }, + { + "markdown": "The number of windows in my house is\n14. The number of doors is 6.\n", + "html": "<p>The number of windows in my house is\n14. The number of doors is 6.</p>\n", + "example": 304, + "start_line": 5364, + "end_line": 5370, + "section": "Lists" + }, + { + "markdown": "The number of windows in my house is\n1. The number of doors is 6.\n", + "formattedMarkdown": "The number of windows in my house is\n1. The number of doors is 6.", + "html": "<p>The number of windows in my house is</p>\n<ol>\n<li>The number of doors is 6.</li>\n</ol>\n", + "example": 305, + "start_line": 5374, + "end_line": 5382, + "section": "Lists" + }, + { + "markdown": "- foo\n\n- bar\n\n\n- baz\n", + "html": "<ul>\n<li>\n<p>foo</p>\n</li>\n<li>\n<p>bar</p>\n</li>\n<li>\n<p>baz</p>\n</li>\n</ul>\n", + "example": 306, + "start_line": 5388, + "end_line": 5407, + "section": "Lists" + }, + { + "markdown": "- foo\n - bar\n - baz\n\n\n bim\n", + "html": "<ul>\n<li>foo\n<ul>\n<li>bar\n<ul>\n<li>\n<p>baz</p>\n<p>bim</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n", + "example": 307, + "start_line": 5409, + "end_line": 5431, + "section": "Lists" + }, + { + "markdown": "- foo\n- bar\n\n<!-- -->\n\n- baz\n- bim\n", + "html": "<ul>\n<li>foo</li>\n<li>bar</li>\n</ul>\n<!-- -->\n<ul>\n<li>baz</li>\n<li>bim</li>\n</ul>\n", + "example": 308, + "start_line": 5439, + "end_line": 5457, + "section": "Lists" + }, + { + "markdown": "- foo\n\n notcode\n\n- foo\n\n<!-- -->\n\n code\n", + "formattedMarkdown": "- foo\n\n notcode\n\n- foo\n\n<!-- -->\n\n code", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>notcode</p>\n</li>\n<li>\n<p>foo</p>\n</li>\n</ul>\n<!-- -->\n<pre><code>code\n</code></pre>\n", + "example": 309, + "start_line": 5460, + "end_line": 5483, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n - f\n- g\n", + "formattedMarkdown": "- a\n- b\n- c\n- d\n- e\n- f\n- g", + "html": "<ul>\n<li>a</li>\n<li>b</li>\n<li>c</li>\n<li>d</li>\n<li>e</li>\n<li>f</li>\n<li>g</li>\n</ul>\n", + "example": 310, + "start_line": 5491, + "end_line": 5509, + "section": "Lists" + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "formattedMarkdown": "1. a\n\n2. b\n\n3. c", + "html": "<ol>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n<li>\n<p>c</p>\n</li>\n</ol>\n", + "example": 311, + "start_line": 5512, + "end_line": 5530, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n", + "formattedMarkdown": "- a\n- b\n- c\n- d\n \\- e", + "html": "<ul>\n<li>a</li>\n<li>b</li>\n<li>c</li>\n<li>d\n- e</li>\n</ul>\n", + "example": 312, + "start_line": 5536, + "end_line": 5550, + "section": "Lists" + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "formattedMarkdown": "1. a\n\n2. b\n<!-- Dont absorb code block into list -->\n<!-- Consider a feenced code block instead -->\n\n 3. c", + "html": "<ol>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n</ol>\n<pre><code>3. c\n</code></pre>\n", + "example": 313, + "start_line": 5556, + "end_line": 5573, + "section": "Lists", + "testMacro": "test" + }, + { + "markdown": "- a\n- b\n\n- c\n", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n<li>\n<p>c</p>\n</li>\n</ul>\n", + "example": 314, + "start_line": 5579, + "end_line": 5596, + "section": "Lists" + }, + { + "markdown": "* a\n*\n\n* c\n", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li></li>\n<li>\n<p>c</p>\n</li>\n</ul>\n", + "example": 315, + "start_line": 5601, + "end_line": 5616, + "section": "Lists" + }, + { + "markdown": "- a\n- b\n\n c\n- d\n", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n<p>c</p>\n</li>\n<li>\n<p>d</p>\n</li>\n</ul>\n", + "example": 316, + "start_line": 5623, + "end_line": 5642, + "section": "Lists" + }, + { + "markdown": "- a\n- b\n\n [ref]: /url\n- d\n", + "formattedMarkdown": "- a\n- b\n\n[ref]: /url\n- d", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n<li>\n<p>d</p>\n</li>\n</ul>\n", + "example": 317, + "start_line": 5645, + "end_line": 5663, + "section": "Lists", + "testMacro":"test" + }, + { + "markdown": "- a\n- ```\n b\n\n\n ```\n- c\n", + "formattedMarkdown": "- a\n- ```\n b\n ```\n- c", + "html": "<ul>\n<li>a</li>\n<li>\n<pre><code>b\n\n\n</code></pre>\n</li>\n<li>c</li>\n</ul>\n", + "example": 318, + "start_line": 5668, + "end_line": 5687, + "section": "Lists", + "testMacro": "test" + }, + { + "markdown": "- a\n - b\n\n c\n- d\n", + "html": "<ul>\n<li>a\n<ul>\n<li>\n<p>b</p>\n<p>c</p>\n</li>\n</ul>\n</li>\n<li>d</li>\n</ul>\n", + "example": 319, + "start_line": 5694, + "end_line": 5712, + "section": "Lists" + }, + { + "markdown": "* a\n > b\n >\n* c\n", + "html": "<ul>\n<li>a\n<blockquote>\n<p>b</p>\n</blockquote>\n</li>\n<li>c</li>\n</ul>\n", + "example": 320, + "start_line": 5718, + "end_line": 5732, + "section": "Lists" + }, + { + "markdown": "- a\n > b\n ```\n c\n ```\n- d\n", + "html": "<ul>\n<li>a\n<blockquote>\n<p>b</p>\n</blockquote>\n<pre><code>c\n</code></pre>\n</li>\n<li>d</li>\n</ul>\n", + "example": 321, + "start_line": 5738, + "end_line": 5756, + "section": "Lists" + }, + { + "markdown": "- a\n", + "html": "<ul>\n<li>a</li>\n</ul>\n", + "example": 322, + "start_line": 5761, + "end_line": 5767, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n", + "html": "<ul>\n<li>a\n<ul>\n<li>b</li>\n</ul>\n</li>\n</ul>\n", + "example": 323, + "start_line": 5770, + "end_line": 5781, + "section": "Lists" + }, + { + "markdown": "1. ```\n foo\n ```\n\n bar\n", + "html": "<ol>\n<li>\n<pre><code>foo\n</code></pre>\n<p>bar</p>\n</li>\n</ol>\n", + "example": 324, + "start_line": 5787, + "end_line": 5801, + "section": "Lists" + }, + { + "markdown": "* foo\n * bar\n\n baz\n", + "html": "<ul>\n<li>\n<p>foo</p>\n<ul>\n<li>bar</li>\n</ul>\n<p>baz</p>\n</li>\n</ul>\n", + "example": 325, + "start_line": 5806, + "end_line": 5821, + "section": "Lists" + }, + { + "markdown": "- a\n - b\n - c\n\n- d\n - e\n - f\n", + "html": "<ul>\n<li>\n<p>a</p>\n<ul>\n<li>b</li>\n<li>c</li>\n</ul>\n</li>\n<li>\n<p>d</p>\n<ul>\n<li>e</li>\n<li>f</li>\n</ul>\n</li>\n</ul>\n", + "example": 326, + "start_line": 5824, + "end_line": 5849, + "section": "Lists" + }, + { + "markdown": "`hi`lo`\n", + "html": "<p><code>hi</code>lo`</p>\n", + "example": 327, + "start_line": 5858, + "end_line": 5862, + "section": "Inlines" + }, + { + "markdown": "`foo`\n", + "html": "<p><code>foo</code></p>\n", + "example": 328, + "start_line": 5890, + "end_line": 5894, + "section": "Code spans" + }, + { + "markdown": "`` foo ` bar ``\n", + "html": "<p><code>foo ` bar</code></p>\n", + "example": 329, + "start_line": 5901, + "end_line": 5905, + "section": "Code spans" + }, + { + "markdown": "` `` `\n", + "html": "<p><code>``</code></p>\n", + "example": 330, + "start_line": 5911, + "end_line": 5915, + "section": "Code spans" + }, + { + "markdown": "` `` `\n", + "html": "<p><code> `` </code></p>\n", + "example": 331, + "start_line": 5919, + "end_line": 5923, + "section": "Code spans" + }, + { + "markdown": "` a`\n", + "html": "<p><code> a</code></p>\n", + "example": 332, + "start_line": 5928, + "end_line": 5932, + "section": "Code spans" + }, + { + "markdown": "` b `\n", + "html": "<p><code> b </code></p>\n", + "example": 333, + "start_line": 5937, + "end_line": 5941, + "section": "Code spans" + }, + { + "markdown": "` `\n` `\n", + "html": "<p><code> </code>\n<code> </code></p>\n", + "example": 334, + "start_line": 5945, + "end_line": 5951, + "section": "Code spans" + }, + { + "markdown": "``\nfoo\nbar \nbaz\n``\n", + "html": "<p><code>foo bar baz</code></p>\n", + "example": 335, + "start_line": 5956, + "end_line": 5964, + "section": "Code spans" + }, + { + "markdown": "``\nfoo \n``\n", + "html": "<p><code>foo </code></p>\n", + "example": 336, + "start_line": 5966, + "end_line": 5972, + "section": "Code spans" + }, + { + "markdown": "`foo bar \nbaz`\n", + "html": "<p><code>foo bar baz</code></p>\n", + "example": 337, + "start_line": 5977, + "end_line": 5982, + "section": "Code spans" + }, + { + "markdown": "`foo\\`bar`\n", + "html": "<p><code>foo\\</code>bar`</p>\n", + "example": 338, + "start_line": 5994, + "end_line": 5998, + "section": "Code spans" + }, + { + "markdown": "``foo`bar``\n", + "html": "<p><code>foo`bar</code></p>\n", + "example": 339, + "start_line": 6005, + "end_line": 6009, + "section": "Code spans" + }, + { + "markdown": "` foo `` bar `\n", + "html": "<p><code>foo `` bar</code></p>\n", + "example": 340, + "start_line": 6011, + "end_line": 6015, + "section": "Code spans" + }, + { + "markdown": "*foo`*`\n", + "html": "<p>*foo<code>*</code></p>\n", + "example": 341, + "start_line": 6023, + "end_line": 6027, + "section": "Code spans" + }, + { + "markdown": "[not a `link](/foo`)\n", + "html": "<p>[not a <code>link](/foo</code>)</p>\n", + "example": 342, + "start_line": 6032, + "end_line": 6036, + "section": "Code spans" + }, + { + "markdown": "`<a href=\"`\">`\n", + "html": "<p><code><a href="</code>">`</p>\n", + "example": 343, + "start_line": 6042, + "end_line": 6046, + "section": "Code spans" + }, + { + "markdown": "<a href=\"`\">`\n", + "html": "<p><a href=\"`\">`</p>\n", + "example": 344, + "start_line": 6051, + "end_line": 6055, + "section": "Code spans" + }, + { + "markdown": "`<http://foo.bar.`baz>`\n", + "html": "<p><code><http://foo.bar.</code>baz>`</p>\n", + "example": 345, + "start_line": 6060, + "end_line": 6064, + "section": "Code spans" + }, + { + "markdown": "<http://foo.bar.`baz>`\n", + "html": "<p><a href=\"http://foo.bar.%60baz\">http://foo.bar.`baz</a>`</p>\n", + "example": 346, + "start_line": 6069, + "end_line": 6073, + "section": "Code spans" + }, + { + "markdown": "```foo``\n", + "html": "<p>```foo``</p>\n", + "example": 347, + "start_line": 6079, + "end_line": 6083, + "section": "Code spans" + }, + { + "markdown": "`foo\n", + "html": "<p>`foo</p>\n", + "example": 348, + "start_line": 6086, + "end_line": 6090, + "section": "Code spans" + }, + { + "markdown": "`foo``bar``\n", + "html": "<p>`foo<code>bar</code></p>\n", + "example": 349, + "start_line": 6095, + "end_line": 6099, + "section": "Code spans" + }, + { + "markdown": "*foo bar*\n", + "html": "<p><em>foo bar</em></p>\n", + "example": 350, + "start_line": 6312, + "end_line": 6316, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a * foo bar*\n", + "html": "<p>a * foo bar*</p>\n", + "example": 351, + "start_line": 6322, + "end_line": 6326, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a*\"foo\"*\n", + "html": "<p>a*"foo"*</p>\n", + "example": 352, + "start_line": 6333, + "end_line": 6337, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "* a *\n", + "html": "<p>* a *</p>\n", + "example": 353, + "start_line": 6342, + "end_line": 6346, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo*bar*\n", + "html": "<p>foo<em>bar</em></p>\n", + "example": 354, + "start_line": 6351, + "end_line": 6355, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5*6*78\n", + "html": "<p>5<em>6</em>78</p>\n", + "example": 355, + "start_line": 6358, + "end_line": 6362, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar_\n", + "html": "<p><em>foo bar</em></p>\n", + "example": 356, + "start_line": 6367, + "end_line": 6371, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_ foo bar_\n", + "html": "<p>_ foo bar_</p>\n", + "example": 357, + "start_line": 6377, + "end_line": 6381, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a_\"foo\"_\n", + "html": "<p>a_"foo"_</p>\n", + "example": 358, + "start_line": 6387, + "end_line": 6391, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo_bar_\n", + "html": "<p>foo_bar_</p>\n", + "example": 359, + "start_line": 6396, + "end_line": 6400, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5_6_78\n", + "html": "<p>5_6_78</p>\n", + "example": 360, + "start_line": 6403, + "end_line": 6407, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням_стремятся_\n", + "html": "<p>пристаням_стремятся_</p>\n", + "example": 361, + "start_line": 6410, + "end_line": 6414, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "aa_\"bb\"_cc\n", + "html": "<p>aa_"bb"_cc</p>\n", + "example": 362, + "start_line": 6420, + "end_line": 6424, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo-_(bar)_\n", + "html": "<p>foo-<em>(bar)</em></p>\n", + "example": 363, + "start_line": 6431, + "end_line": 6435, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo*\n", + "html": "<p>_foo*</p>\n", + "example": 364, + "start_line": 6443, + "end_line": 6447, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar *\n", + "html": "<p>*foo bar *</p>\n", + "example": 365, + "start_line": 6453, + "end_line": 6457, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar\n*\n", + "formattedMarkdown": "*foo bar\n*", + "html": "<p>*foo bar\n*</p>\n", + "example": 366, + "start_line": 6462, + "end_line": 6468, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(*foo)\n", + "html": "<p>*(*foo)</p>\n", + "example": 367, + "start_line": 6475, + "end_line": 6479, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(*foo*)*\n", + "html": "<p><em>(<em>foo</em>)</em></p>\n", + "example": 368, + "start_line": 6485, + "end_line": 6489, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo*bar\n", + "html": "<p><em>foo</em>bar</p>\n", + "example": 369, + "start_line": 6494, + "end_line": 6498, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar _\n", + "html": "<p>_foo bar _</p>\n", + "example": 370, + "start_line": 6507, + "end_line": 6511, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(_foo)\n", + "html": "<p>_(_foo)</p>\n", + "example": 371, + "start_line": 6517, + "end_line": 6521, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(_foo_)_\n", + "html": "<p><em>(<em>foo</em>)</em></p>\n", + "example": 372, + "start_line": 6526, + "end_line": 6530, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo_bar\n", + "html": "<p>_foo_bar</p>\n", + "example": 373, + "start_line": 6535, + "end_line": 6539, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_пристаням_стремятся\n", + "html": "<p>_пристаням_стремятся</p>\n", + "example": 374, + "start_line": 6542, + "end_line": 6546, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo_bar_baz_\n", + "html": "<p><em>foo_bar_baz</em></p>\n", + "example": 375, + "start_line": 6549, + "end_line": 6553, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(bar)_.\n", + "html": "<p><em>(bar)</em>.</p>\n", + "example": 376, + "start_line": 6560, + "end_line": 6564, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar**\n", + "html": "<p><strong>foo bar</strong></p>\n", + "example": 377, + "start_line": 6569, + "end_line": 6573, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "** foo bar**\n", + "html": "<p>** foo bar**</p>\n", + "example": 378, + "start_line": 6579, + "end_line": 6583, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a**\"foo\"**\n", + "html": "<p>a**"foo"**</p>\n", + "example": 379, + "start_line": 6590, + "end_line": 6594, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo**bar**\n", + "html": "<p>foo<strong>bar</strong></p>\n", + "example": 380, + "start_line": 6599, + "end_line": 6603, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar__\n", + "html": "<p><strong>foo bar</strong></p>\n", + "example": 381, + "start_line": 6608, + "end_line": 6612, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ foo bar__\n", + "html": "<p>__ foo bar__</p>\n", + "example": 382, + "start_line": 6618, + "end_line": 6622, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__\nfoo bar__\n", + "html": "<p>__\nfoo bar__</p>\n", + "example": 383, + "start_line": 6626, + "end_line": 6632, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a__\"foo\"__\n", + "html": "<p>a__"foo"__</p>\n", + "example": 384, + "start_line": 6638, + "end_line": 6642, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo__bar__\n", + "html": "<p>foo__bar__</p>\n", + "example": 385, + "start_line": 6647, + "end_line": 6651, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5__6__78\n", + "html": "<p>5__6__78</p>\n", + "example": 386, + "start_line": 6654, + "end_line": 6658, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням__стремятся__\n", + "html": "<p>пристаням__стремятся__</p>\n", + "example": 387, + "start_line": 6661, + "end_line": 6665, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo, __bar__, baz__\n", + "html": "<p><strong>foo, <strong>bar</strong>, baz</strong></p>\n", + "example": 388, + "start_line": 6668, + "end_line": 6672, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo-__(bar)__\n", + "html": "<p>foo-<strong>(bar)</strong></p>\n", + "example": 389, + "start_line": 6679, + "end_line": 6683, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar **\n", + "html": "<p>**foo bar **</p>\n", + "example": 390, + "start_line": 6692, + "end_line": 6696, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**(**foo)\n", + "html": "<p>**(**foo)</p>\n", + "example": 391, + "start_line": 6705, + "end_line": 6709, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(**foo**)*\n", + "html": "<p><em>(<strong>foo</strong>)</em></p>\n", + "example": 392, + "start_line": 6715, + "end_line": 6719, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**\n", + "html": "<p><strong>Gomphocarpus (<em>Gomphocarpus physocarpus</em>, syn.\n<em>Asclepias physocarpa</em>)</strong></p>\n", + "example": 393, + "start_line": 6722, + "end_line": 6728, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo \"*bar*\" foo**\n", + "html": "<p><strong>foo "<em>bar</em>" foo</strong></p>\n", + "example": 394, + "start_line": 6731, + "end_line": 6735, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo**bar\n", + "html": "<p><strong>foo</strong>bar</p>\n", + "example": 395, + "start_line": 6740, + "end_line": 6744, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar __\n", + "html": "<p>__foo bar __</p>\n", + "example": 396, + "start_line": 6752, + "end_line": 6756, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__(__foo)\n", + "html": "<p>__(__foo)</p>\n", + "example": 397, + "start_line": 6762, + "end_line": 6766, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(__foo__)_\n", + "html": "<p><em>(<strong>foo</strong>)</em></p>\n", + "example": 398, + "start_line": 6772, + "end_line": 6776, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__bar\n", + "html": "<p>__foo__bar</p>\n", + "example": 399, + "start_line": 6781, + "end_line": 6785, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__пристаням__стремятся\n", + "html": "<p>__пристаням__стремятся</p>\n", + "example": 400, + "start_line": 6788, + "end_line": 6792, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__bar__baz__\n", + "html": "<p><strong>foo__bar__baz</strong></p>\n", + "example": 401, + "start_line": 6795, + "end_line": 6799, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__(bar)__.\n", + "html": "<p><strong>(bar)</strong>.</p>\n", + "example": 402, + "start_line": 6806, + "end_line": 6810, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo [bar](/url)*\n", + "html": "<p><em>foo <a href=\"/url\">bar</a></em></p>\n", + "example": 403, + "start_line": 6818, + "end_line": 6822, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo\nbar*\n", + "html": "<p><em>foo\nbar</em></p>\n", + "example": 404, + "start_line": 6825, + "end_line": 6831, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo __bar__ baz_\n", + "html": "<p><em>foo <strong>bar</strong> baz</em></p>\n", + "example": 405, + "start_line": 6837, + "end_line": 6841, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo _bar_ baz_\n", + "html": "<p><em>foo <em>bar</em> baz</em></p>\n", + "example": 406, + "start_line": 6844, + "end_line": 6848, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo_ bar_\n", + "html": "<p><em><em>foo</em> bar</em></p>\n", + "example": 407, + "start_line": 6851, + "end_line": 6855, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo *bar**\n", + "html": "<p><em>foo <em>bar</em></em></p>\n", + "example": 408, + "start_line": 6858, + "end_line": 6862, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar** baz*\n", + "html": "<p><em>foo <strong>bar</strong> baz</em></p>\n", + "example": 409, + "start_line": 6865, + "end_line": 6869, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar**baz*\n", + "html": "<p><em>foo<strong>bar</strong>baz</em></p>\n", + "example": 410, + "start_line": 6871, + "end_line": 6875, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar*\n", + "html": "<p><em>foo**bar</em></p>\n", + "example": 411, + "start_line": 6895, + "end_line": 6899, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo** bar*\n", + "html": "<p><em><strong>foo</strong> bar</em></p>\n", + "example": 412, + "start_line": 6908, + "end_line": 6912, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar***\n", + "html": "<p><em>foo <strong>bar</strong></em></p>\n", + "example": 413, + "start_line": 6915, + "end_line": 6919, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar***\n", + "html": "<p><em>foo<strong>bar</strong></em></p>\n", + "example": 414, + "start_line": 6922, + "end_line": 6926, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo***bar***baz\n", + "html": "<p>foo<em><strong>bar</strong></em>baz</p>\n", + "example": 415, + "start_line": 6933, + "end_line": 6937, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo******bar*********baz\n", + "html": "<p>foo<strong><strong><strong>bar</strong></strong></strong>***baz</p>\n", + "example": 416, + "start_line": 6939, + "end_line": 6943, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar *baz* bim** bop*\n", + "html": "<p><em>foo <strong>bar <em>baz</em> bim</strong> bop</em></p>\n", + "example": 417, + "start_line": 6948, + "end_line": 6952, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo [*bar*](/url)*\n", + "html": "<p><em>foo <a href=\"/url\"><em>bar</em></a></em></p>\n", + "example": 418, + "start_line": 6955, + "end_line": 6959, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "** is not an empty emphasis\n", + "html": "<p>** is not an empty emphasis</p>\n", + "example": 419, + "start_line": 6964, + "end_line": 6968, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**** is not an empty strong emphasis\n", + "html": "<p>**** is not an empty strong emphasis</p>\n", + "example": 420, + "start_line": 6971, + "end_line": 6975, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo [bar](/url)**\n", + "html": "<p><strong>foo <a href=\"/url\">bar</a></strong></p>\n", + "example": 421, + "start_line": 6984, + "end_line": 6988, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo\nbar**\n", + "html": "<p><strong>foo\nbar</strong></p>\n", + "example": 422, + "start_line": 6991, + "end_line": 6997, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo _bar_ baz__\n", + "html": "<p><strong>foo <em>bar</em> baz</strong></p>\n", + "example": 423, + "start_line": 7003, + "end_line": 7007, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo __bar__ baz__\n", + "html": "<p><strong>foo <strong>bar</strong> baz</strong></p>\n", + "example": 424, + "start_line": 7010, + "end_line": 7014, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo__ bar__\n", + "html": "<p><strong><strong>foo</strong> bar</strong></p>\n", + "example": 425, + "start_line": 7017, + "end_line": 7021, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo **bar****\n", + "html": "<p><strong>foo <strong>bar</strong></strong></p>\n", + "example": 426, + "start_line": 7024, + "end_line": 7028, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar* baz**\n", + "html": "<p><strong>foo <em>bar</em> baz</strong></p>\n", + "example": 427, + "start_line": 7031, + "end_line": 7035, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*bar*baz**\n", + "html": "<p><strong>foo<em>bar</em>baz</strong></p>\n", + "example": 428, + "start_line": 7038, + "end_line": 7042, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo* bar**\n", + "html": "<p><strong><em>foo</em> bar</strong></p>\n", + "example": 429, + "start_line": 7045, + "end_line": 7049, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar***\n", + "html": "<p><strong>foo <em>bar</em></strong></p>\n", + "example": 430, + "start_line": 7052, + "end_line": 7056, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar **baz**\nbim* bop**\n", + "html": "<p><strong>foo <em>bar <strong>baz</strong>\nbim</em> bop</strong></p>\n", + "example": 431, + "start_line": 7061, + "end_line": 7067, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo [*bar*](/url)**\n", + "html": "<p><strong>foo <a href=\"/url\"><em>bar</em></a></strong></p>\n", + "example": 432, + "start_line": 7070, + "end_line": 7074, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ is not an empty emphasis\n", + "html": "<p>__ is not an empty emphasis</p>\n", + "example": 433, + "start_line": 7079, + "end_line": 7083, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____ is not an empty strong emphasis\n", + "html": "<p>____ is not an empty strong emphasis</p>\n", + "example": 434, + "start_line": 7086, + "end_line": 7090, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo ***\n", + "html": "<p>foo ***</p>\n", + "example": 435, + "start_line": 7096, + "end_line": 7100, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *\\**\n", + "html": "<p>foo <em>*</em></p>\n", + "example": 436, + "start_line": 7103, + "end_line": 7107, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *_*\n", + "html": "<p>foo <em>_</em></p>\n", + "example": 437, + "start_line": 7110, + "end_line": 7114, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *****\n", + "html": "<p>foo *****</p>\n", + "example": 438, + "start_line": 7117, + "end_line": 7121, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **\\***\n", + "html": "<p>foo <strong>*</strong></p>\n", + "example": 439, + "start_line": 7124, + "end_line": 7128, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **_**\n", + "html": "<p>foo <strong>_</strong></p>\n", + "example": 440, + "start_line": 7131, + "end_line": 7135, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*\n", + "html": "<p>*<em>foo</em></p>\n", + "example": 441, + "start_line": 7142, + "end_line": 7146, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**\n", + "html": "<p><em>foo</em>*</p>\n", + "example": 442, + "start_line": 7149, + "end_line": 7153, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo**\n", + "html": "<p>*<strong>foo</strong></p>\n", + "example": 443, + "start_line": 7156, + "end_line": 7160, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "****foo*\n", + "html": "<p>***<em>foo</em></p>\n", + "example": 444, + "start_line": 7163, + "end_line": 7167, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo***\n", + "html": "<p><strong>foo</strong>*</p>\n", + "example": 445, + "start_line": 7170, + "end_line": 7174, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo****\n", + "html": "<p><em>foo</em>***</p>\n", + "example": 446, + "start_line": 7177, + "end_line": 7181, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo ___\n", + "html": "<p>foo ___</p>\n", + "example": 447, + "start_line": 7187, + "end_line": 7191, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _\\__\n", + "html": "<p>foo <em>_</em></p>\n", + "example": 448, + "start_line": 7194, + "end_line": 7198, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _*_\n", + "html": "<p>foo <em>*</em></p>\n", + "example": 449, + "start_line": 7201, + "end_line": 7205, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _____\n", + "html": "<p>foo _____</p>\n", + "example": 450, + "start_line": 7208, + "end_line": 7212, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __\\___\n", + "html": "<p>foo <strong>_</strong></p>\n", + "example": 451, + "start_line": 7215, + "end_line": 7219, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __*__\n", + "html": "<p>foo <strong>*</strong></p>\n", + "example": 452, + "start_line": 7222, + "end_line": 7226, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo_\n", + "html": "<p>_<em>foo</em></p>\n", + "example": 453, + "start_line": 7229, + "end_line": 7233, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo__\n", + "html": "<p><em>foo</em>_</p>\n", + "example": 454, + "start_line": 7240, + "end_line": 7244, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "___foo__\n", + "html": "<p>_<strong>foo</strong></p>\n", + "example": 455, + "start_line": 7247, + "end_line": 7251, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo_\n", + "html": "<p>___<em>foo</em></p>\n", + "example": 456, + "start_line": 7254, + "end_line": 7258, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo___\n", + "html": "<p><strong>foo</strong>_</p>\n", + "example": 457, + "start_line": 7261, + "end_line": 7265, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo____\n", + "html": "<p><em>foo</em>___</p>\n", + "example": 458, + "start_line": 7268, + "end_line": 7272, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo**\n", + "html": "<p><strong>foo</strong></p>\n", + "example": 459, + "start_line": 7278, + "end_line": 7282, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*_foo_*\n", + "html": "<p><em><em>foo</em></em></p>\n", + "example": 460, + "start_line": 7285, + "end_line": 7289, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__\n", + "html": "<p><strong>foo</strong></p>\n", + "example": 461, + "start_line": 7292, + "end_line": 7296, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_*foo*_\n", + "html": "<p><em><em>foo</em></em></p>\n", + "example": 462, + "start_line": 7299, + "end_line": 7303, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "****foo****\n", + "html": "<p><strong><strong>foo</strong></strong></p>\n", + "example": 463, + "start_line": 7309, + "end_line": 7313, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo____\n", + "html": "<p><strong><strong>foo</strong></strong></p>\n", + "example": 464, + "start_line": 7316, + "end_line": 7320, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "******foo******\n", + "html": "<p><strong><strong><strong>foo</strong></strong></strong></p>\n", + "example": 465, + "start_line": 7327, + "end_line": 7331, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo***\n", + "html": "<p><em><strong>foo</strong></em></p>\n", + "example": 466, + "start_line": 7336, + "end_line": 7340, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_____foo_____\n", + "html": "<p><em><strong><strong>foo</strong></strong></em></p>\n", + "example": 467, + "start_line": 7343, + "end_line": 7347, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo _bar* baz_\n", + "html": "<p><em>foo _bar</em> baz_</p>\n", + "example": 468, + "start_line": 7352, + "end_line": 7356, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo __bar *baz bim__ bam*\n", + "html": "<p><em>foo <strong>bar *baz bim</strong> bam</em></p>\n", + "example": 469, + "start_line": 7359, + "end_line": 7363, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo **bar baz**\n", + "html": "<p>**foo <strong>bar baz</strong></p>\n", + "example": 470, + "start_line": 7368, + "end_line": 7372, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo *bar baz*\n", + "html": "<p>*foo <em>bar baz</em></p>\n", + "example": 471, + "start_line": 7375, + "end_line": 7379, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*[bar*](/url)\n", + "html": "<p>*<a href=\"/url\">bar*</a></p>\n", + "example": 472, + "start_line": 7384, + "end_line": 7388, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo [bar_](/url)\n", + "html": "<p>_foo <a href=\"/url\">bar_</a></p>\n", + "example": 473, + "start_line": 7391, + "end_line": 7395, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*<img src=\"foo\" title=\"*\"/>\n", + "html": "<p>*<img src=\"foo\" title=\"*\"/></p>\n", + "example": 474, + "start_line": 7398, + "end_line": 7402, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**<a href=\"**\">\n", + "html": "<p>**<a href=\"**\"></p>\n", + "example": 475, + "start_line": 7405, + "end_line": 7409, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__<a href=\"__\">\n", + "html": "<p>__<a href=\"__\"></p>\n", + "example": 476, + "start_line": 7412, + "end_line": 7416, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*a `*`*\n", + "html": "<p><em>a <code>*</code></em></p>\n", + "example": 477, + "start_line": 7419, + "end_line": 7423, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_a `_`_\n", + "html": "<p><em>a <code>_</code></em></p>\n", + "example": 478, + "start_line": 7426, + "end_line": 7430, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**a<http://foo.bar/?q=**>\n", + "html": "<p>**a<a href=\"http://foo.bar/?q=**\">http://foo.bar/?q=**</a></p>\n", + "example": 479, + "start_line": 7433, + "end_line": 7437, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__a<http://foo.bar/?q=__>\n", + "html": "<p>__a<a href=\"http://foo.bar/?q=__\">http://foo.bar/?q=__</a></p>\n", + "example": 480, + "start_line": 7440, + "end_line": 7444, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "[link](/uri \"title\")\n", + "html": "<p><a href=\"/uri\" title=\"title\">link</a></p>\n", + "example": 481, + "start_line": 7528, + "end_line": 7532, + "section": "Links" + }, + { + "markdown": "[link](/uri)\n", + "html": "<p><a href=\"/uri\">link</a></p>\n", + "example": 482, + "start_line": 7538, + "end_line": 7542, + "section": "Links" + }, + { + "markdown": "[](./target.md)\n", + "html": "<p><a href=\"./target.md\"></a></p>\n", + "example": 483, + "start_line": 7544, + "end_line": 7548, + "section": "Links" + }, + { + "markdown": "[link]()\n", + "html": "<p><a href=\"\">link</a></p>\n", + "example": 484, + "start_line": 7551, + "end_line": 7555, + "section": "Links" + }, + { + "markdown": "[link](<>)\n", + "formattedMarkdown": "[link]()", + "html": "<p><a href=\"\">link</a></p>\n", + "example": 485, + "start_line": 7558, + "end_line": 7562, + "section": "Links" + }, + { + "markdown": "[]()\n", + "html": "<p><a href=\"\"></a></p>\n", + "example": 486, + "start_line": 7565, + "end_line": 7569, + "section": "Links" + }, + { + "markdown": "[link](/my uri)\n", + "html": "<p>[link](/my uri)</p>\n", + "example": 487, + "start_line": 7574, + "end_line": 7578, + "section": "Links" + }, + { + "markdown": "[link](</my uri>)\n", + "html": "<p><a href=\"/my%20uri\">link</a></p>\n", + "example": 488, + "start_line": 7580, + "end_line": 7584, + "section": "Links" + }, + { + "markdown": "[link](foo\nbar)\n", + "html": "<p>[link](foo\nbar)</p>\n", + "example": 489, + "start_line": 7589, + "end_line": 7595, + "section": "Links" + }, + { + "markdown": "[link](<foo\nbar>)\n", + "html": "<p>[link](<foo\nbar>)</p>\n", + "example": 490, + "start_line": 7597, + "end_line": 7603, + "section": "Links" + }, + { + "markdown": "[a](<b)c>)\n", + "html": "<p><a href=\"b)c\">a</a></p>\n", + "example": 491, + "start_line": 7608, + "end_line": 7612, + "section": "Links" + }, + { + "markdown": "[link](<foo\\>)\n", + "html": "<p>[link](<foo>)</p>\n", + "example": 492, + "start_line": 7616, + "end_line": 7620, + "section": "Links" + }, + { + "markdown": "[a](<b)c\n[a](<b)c>\n[a](<b>c)\n", + "html": "<p>[a](<b)c\n[a](<b)c>\n[a](<b>c)</p>\n", + "example": 493, + "start_line": 7625, + "end_line": 7633, + "section": "Links" + }, + { + "markdown": "[link](\\(foo\\))\n", + "formattedMarkdown": "[link](\\(foo\\))", + "html": "<p><a href=\"(foo)\">link</a></p>\n", + "example": 494, + "start_line": 7637, + "end_line": 7641, + "section": "Links" + }, + { + "markdown": "[link](foo(and(bar)))\n", + "html": "<p><a href=\"foo(and(bar))\">link</a></p>\n", + "example": 495, + "start_line": 7646, + "end_line": 7650, + "section": "Links" + }, + { + "markdown": "[link](foo(and(bar))\n", + "html": "<p>[link](foo(and(bar))</p>\n", + "example": 496, + "start_line": 7655, + "end_line": 7659, + "section": "Links" + }, + { + "markdown": "[link](foo\\(and\\(bar\\))\n", + "formattedMarkdown": "[link](foo\\(and\\(bar\\))", + "html": "<p><a href=\"foo(and(bar)\">link</a></p>\n", + "example": 497, + "start_line": 7662, + "end_line": 7666, + "section": "Links" + }, + { + "markdown": "[link](<foo(and(bar)>)\n", + "html": "<p><a href=\"foo(and(bar)\">link</a></p>\n", + "example": 498, + "start_line": 7669, + "end_line": 7673, + "section": "Links" + }, + { + "markdown": "[link](foo\\)\\:)\n", + "formattedMarkdown": "[link](foo\\)\\:)", + "html": "<p><a href=\"foo):\">link</a></p>\n", + "example": 499, + "start_line": 7679, + "end_line": 7683, + "section": "Links" + }, + { + "markdown": "[link](#fragment)\n\n[link](http://example.com#fragment)\n\n[link](http://example.com?foo=3#frag)\n", + "html": "<p><a href=\"#fragment\">link</a></p>\n<p><a href=\"http://example.com#fragment\">link</a></p>\n<p><a href=\"http://example.com?foo=3#frag\">link</a></p>\n", + "example": 500, + "start_line": 7688, + "end_line": 7698, + "section": "Links" + }, + { + "markdown": "[link](foo\\bar)\n", + "html": "<p><a href=\"foo%5Cbar\">link</a></p>\n", + "example": 501, + "start_line": 7704, + "end_line": 7708, + "section": "Links" + }, + { + "markdown": "[link](foo%20bä)\n", + "formattedMarkdown": "[link](foo%20bä)", + "html": "<p><a href=\"foo%20b%C3%A4\">link</a></p>\n", + "example": 502, + "start_line": 7720, + "end_line": 7724, + "section": "Links" + }, + { + "markdown": "[link](\"title\")\n", + "html": "<p><a href=\"%22title%22\">link</a></p>\n", + "example": 503, + "start_line": 7731, + "end_line": 7735, + "section": "Links" + }, + { + "markdown": "[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))\n", + "formattedMarkdown": "[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))", + "html": "<p><a href=\"/url\" title=\"title\">link</a>\n<a href=\"/url\" title=\"title\">link</a>\n<a href=\"/url\" title=\"title\">link</a></p>\n", + "example": 504, + "start_line": 7740, + "end_line": 7748, + "section": "Links" + }, + { + "markdown": "[link](/url \"title \\\""\")\n", + "html": "<p><a href=\"/url\" title=\"title ""\">link</a></p>\n", + "example": 505, + "start_line": 7754, + "end_line": 7758, + "section": "Links" + }, + { + "markdown": "[link](/url \"title\")\n", + "formattedMarkdown": "[link](/url \"title\")", + "html": "<p><a href=\"/url%C2%A0%22title%22\">link</a></p>\n", + "example": 506, + "start_line": 7765, + "end_line": 7769, + "section": "Links", + "testMacro": "test" + }, + { + "markdown": "[link](/url \"title \"and\" title\")\n", + "html": "<p>[link](/url "title "and" title")</p>\n", + "example": 507, + "start_line": 7774, + "end_line": 7778, + "section": "Links" + }, + { + "markdown": "[link](/url 'title \"and\" title')\n", + "html": "<p><a href=\"/url\" title=\"title "and" title\">link</a></p>\n", + "example": 508, + "start_line": 7783, + "end_line": 7787, + "section": "Links" + }, + { + "markdown": "[link]( /uri\n \"title\" )\n", + "formattedMarkdown": "[link](/uri \"title\")", + "html": "<p><a href=\"/uri\" title=\"title\">link</a></p>\n", + "example": 509, + "start_line": 7808, + "end_line": 7813, + "section": "Links" + }, + { + "markdown": "[link] (/uri)\n", + "html": "<p>[link] (/uri)</p>\n", + "example": 510, + "start_line": 7819, + "end_line": 7823, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]](/uri)\n", + "html": "<p><a href=\"/uri\">link [foo [bar]]</a></p>\n", + "example": 511, + "start_line": 7829, + "end_line": 7833, + "section": "Links" + }, + { + "markdown": "[link] bar](/uri)\n", + "html": "<p>[link] bar](/uri)</p>\n", + "example": 512, + "start_line": 7836, + "end_line": 7840, + "section": "Links" + }, + { + "markdown": "[link [bar](/uri)\n", + "html": "<p>[link <a href=\"/uri\">bar</a></p>\n", + "example": 513, + "start_line": 7843, + "end_line": 7847, + "section": "Links" + }, + { + "markdown": "[link \\[bar](/uri)\n", + "html": "<p><a href=\"/uri\">link [bar</a></p>\n", + "example": 514, + "start_line": 7850, + "end_line": 7854, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*](/uri)\n", + "html": "<p><a href=\"/uri\">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>\n", + "example": 515, + "start_line": 7859, + "end_line": 7863, + "section": "Links" + }, + { + "markdown": "[![moon](moon.jpg)](/uri)\n", + "html": "<p><a href=\"/uri\"><img src=\"moon.jpg\" alt=\"moon\" /></a></p>\n", + "example": 516, + "start_line": 7866, + "end_line": 7870, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)](/uri)\n", + "html": "<p>[foo <a href=\"/uri\">bar</a>](/uri)</p>\n", + "example": 517, + "start_line": 7875, + "end_line": 7879, + "section": "Links" + }, + { + "markdown": "[foo *[bar [baz](/uri)](/uri)*](/uri)\n", + "html": "<p>[foo <em>[bar <a href=\"/uri\">baz</a>](/uri)</em>](/uri)</p>\n", + "example": 518, + "start_line": 7882, + "end_line": 7886, + "section": "Links" + }, + { + "markdown": "![[[foo](uri1)](uri2)](uri3)\n", + "html": "<p><img src=\"uri3\" alt=\"[foo](uri2)\" /></p>\n", + "example": 519, + "start_line": 7889, + "end_line": 7893, + "section": "Links" + }, + { + "markdown": "*[foo*](/uri)\n", + "html": "<p>*<a href=\"/uri\">foo*</a></p>\n", + "example": 520, + "start_line": 7899, + "end_line": 7903, + "section": "Links" + }, + { + "markdown": "[foo *bar](baz*)\n", + "html": "<p><a href=\"baz*\">foo *bar</a></p>\n", + "example": 521, + "start_line": 7906, + "end_line": 7910, + "section": "Links" + }, + { + "markdown": "*foo [bar* baz]\n", + "html": "<p><em>foo [bar</em> baz]</p>\n", + "example": 522, + "start_line": 7916, + "end_line": 7920, + "section": "Links" + }, + { + "markdown": "[foo <bar attr=\"](baz)\">\n", + "html": "<p>[foo <bar attr=\"](baz)\"></p>\n", + "example": 523, + "start_line": 7926, + "end_line": 7930, + "section": "Links" + }, + { + "markdown": "[foo`](/uri)`\n", + "html": "<p>[foo<code>](/uri)</code></p>\n", + "example": 524, + "start_line": 7933, + "end_line": 7937, + "section": "Links" + }, + { + "markdown": "[foo<http://example.com/?search=](uri)>\n", + "html": "<p>[foo<a href=\"http://example.com/?search=%5D(uri)\">http://example.com/?search=](uri)</a></p>\n", + "example": 525, + "start_line": 7940, + "end_line": 7944, + "section": "Links" + }, + { + "markdown": "[foo][bar]\n\n[bar]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 526, + "start_line": 7978, + "end_line": 7984, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">link [foo [bar]]</a></p>\n", + "example": 527, + "start_line": 7993, + "end_line": 7999, + "section": "Links" + }, + { + "markdown": "[link \\[bar][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">link [bar</a></p>\n", + "example": 528, + "start_line": 8002, + "end_line": 8008, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>\n", + "example": 529, + "start_line": 8013, + "end_line": 8019, + "section": "Links" + }, + { + "markdown": "[![moon](moon.jpg)][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\"><img src=\"moon.jpg\" alt=\"moon\" /></a></p>\n", + "example": 530, + "start_line": 8022, + "end_line": 8028, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)][ref]\n\n[ref]: /uri\n", + "html": "<p>[foo <a href=\"/uri\">bar</a>]<a href=\"/uri\">ref</a></p>\n", + "example": 531, + "start_line": 8033, + "end_line": 8039, + "section": "Links" + }, + { + "markdown": "[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri\n", + "html": "<p>[foo <em>bar <a href=\"/uri\">baz</a></em>]<a href=\"/uri\">ref</a></p>\n", + "example": 532, + "start_line": 8042, + "end_line": 8048, + "section": "Links" + }, + { + "markdown": "*[foo*][ref]\n\n[ref]: /uri\n", + "html": "<p>*<a href=\"/uri\">foo*</a></p>\n", + "example": 533, + "start_line": 8057, + "end_line": 8063, + "section": "Links" + }, + { + "markdown": "[foo *bar][ref]*\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">foo *bar</a>*</p>\n", + "example": 534, + "start_line": 8066, + "end_line": 8072, + "section": "Links" + }, + { + "markdown": "[foo <bar attr=\"][ref]\">\n\n[ref]: /uri\n", + "html": "<p>[foo <bar attr=\"][ref]\"></p>\n", + "example": 535, + "start_line": 8078, + "end_line": 8084, + "section": "Links" + }, + { + "markdown": "[foo`][ref]`\n\n[ref]: /uri\n", + "html": "<p>[foo<code>][ref]</code></p>\n", + "example": 536, + "start_line": 8087, + "end_line": 8093, + "section": "Links" + }, + { + "markdown": "[foo<http://example.com/?search=][ref]>\n\n[ref]: /uri\n", + "html": "<p>[foo<a href=\"http://example.com/?search=%5D%5Bref%5D\">http://example.com/?search=][ref]</a></p>\n", + "example": 537, + "start_line": 8096, + "end_line": 8102, + "section": "Links" + }, + { + "markdown": "[foo][BaR]\n\n[bar]: /url \"title\"\n", + "formattedMarkdown": "[foo][BaR]\n\n[bar]: /url \"title\"", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 538, + "start_line": 8107, + "end_line": 8113, + "section": "Links" + }, + { + "markdown": "[ẞ]\n\n[SS]: /url\n", + "html": "<p><a href=\"/url\">ẞ</a></p>\n", + "example": 539, + "start_line": 8118, + "end_line": 8124, + "section": "Links" + }, + { + "markdown": "[Foo\n bar]: /url\n\n[Baz][Foo bar]\n", + "formattedMarkdown": "[Foo bar]: /url\n\n[Baz][Foo bar]", + "html": "<p><a href=\"/url\">Baz</a></p>\n", + "example": 540, + "start_line": 8130, + "end_line": 8137, + "section": "Links" + }, + { + "markdown": "[foo] [bar]\n\n[bar]: /url \"title\"\n", + "html": "<p>[foo] <a href=\"/url\" title=\"title\">bar</a></p>\n", + "example": 541, + "start_line": 8143, + "end_line": 8149, + "section": "Links" + }, + { + "markdown": "[foo]\n[bar]\n\n[bar]: /url \"title\"\n", + "html": "<p>[foo]\n<a href=\"/url\" title=\"title\">bar</a></p>\n", + "example": 542, + "start_line": 8152, + "end_line": 8160, + "section": "Links" + }, + { + "markdown": "[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]\n", + "formattedMarkdown": "[foo]: /url1\n\n\n\n[bar][foo]", + "html": "<p><a href=\"/url1\">bar</a></p>\n", + "example": 543, + "start_line": 8193, + "end_line": 8201, + "section": "Links", + "testMacro": "test" + }, + { + "markdown": "[bar][foo\\!]\n\n[foo!]: /url\n", + "html": "<p>[bar][foo!]</p>\n", + "example": 544, + "start_line": 8208, + "end_line": 8214, + "section": "Links" + }, + { + "markdown": "[foo][ref[]\n\n[ref[]: /uri\n", + "html": "<p>[foo][ref[]</p>\n<p>[ref[]: /uri</p>\n", + "example": 545, + "start_line": 8220, + "end_line": 8227, + "section": "Links" + }, + { + "markdown": "[foo][ref[bar]]\n\n[ref[bar]]: /uri\n", + "html": "<p>[foo][ref[bar]]</p>\n<p>[ref[bar]]: /uri</p>\n", + "example": 546, + "start_line": 8230, + "end_line": 8237, + "section": "Links" + }, + { + "markdown": "[[[foo]]]\n\n[[[foo]]]: /url\n", + "html": "<p>[[[foo]]]</p>\n<p>[[[foo]]]: /url</p>\n", + "example": 547, + "start_line": 8240, + "end_line": 8247, + "section": "Links" + }, + { + "markdown": "[foo][ref\\[]\n\n[ref\\[]: /uri\n", + "html": "<p><a href=\"/uri\">foo</a></p>\n", + "example": 548, + "start_line": 8250, + "end_line": 8256, + "section": "Links" + }, + { + "markdown": "[bar\\\\]: /uri\n\n[bar\\\\]\n", + "formattedMarkdown": "[bar\\\\]: /uri\n\n[bar\\\\]", + "html": "<p><a href=\"/uri\">bar\\</a></p>\n", + "example": 549, + "start_line": 8261, + "end_line": 8267, + "section": "Links" + }, + { + "markdown": "[]\n\n[]: /uri\n", + "html": "<p>[]</p>\n<p>[]: /uri</p>\n", + "example": 550, + "start_line": 8273, + "end_line": 8280, + "section": "Links" + }, + { + "markdown": "[\n ]\n\n[\n ]: /uri\n", + "formattedMarkdown": "[\n]\n\n[\n]: /uri", + "html": "<p>[\n]</p>\n<p>[\n]: /uri</p>\n", + "example": 551, + "start_line": 8283, + "end_line": 8294, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 552, + "start_line": 8306, + "end_line": 8312, + "section": "Links" + }, + { + "markdown": "[*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\"><em>foo</em> bar</a></p>\n", + "example": 553, + "start_line": 8315, + "end_line": 8321, + "section": "Links" + }, + { + "markdown": "[Foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">Foo</a></p>\n", + "example": 554, + "start_line": 8326, + "end_line": 8332, + "section": "Links" + }, + { + "markdown": "[foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a>\n[]</p>\n", + "example": 555, + "start_line": 8339, + "end_line": 8347, + "section": "Links" + }, + { + "markdown": "[foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 556, + "start_line": 8359, + "end_line": 8365, + "section": "Links" + }, + { + "markdown": "[*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\"><em>foo</em> bar</a></p>\n", + "example": 557, + "start_line": 8368, + "end_line": 8374, + "section": "Links" + }, + { + "markdown": "[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p>[<a href=\"/url\" title=\"title\"><em>foo</em> bar</a>]</p>\n", + "example": 558, + "start_line": 8377, + "end_line": 8383, + "section": "Links" + }, + { + "markdown": "[[bar [foo]\n\n[foo]: /url\n", + "html": "<p>[[bar <a href=\"/url\">foo</a></p>\n", + "example": 559, + "start_line": 8386, + "end_line": 8392, + "section": "Links" + }, + { + "markdown": "[Foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">Foo</a></p>\n", + "example": 560, + "start_line": 8397, + "end_line": 8403, + "section": "Links" + }, + { + "markdown": "[foo] bar\n\n[foo]: /url\n", + "html": "<p><a href=\"/url\">foo</a> bar</p>\n", + "example": 561, + "start_line": 8408, + "end_line": 8414, + "section": "Links" + }, + { + "markdown": "\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "<p>[foo]</p>\n", + "example": 562, + "start_line": 8420, + "end_line": 8426, + "section": "Links" + }, + { + "markdown": "[foo*]: /url\n\n*[foo*]\n", + "formattedMarkdown": "[foo*]: /url\n\n*[foo*]", + "html": "<p>*<a href=\"/url\">foo*</a></p>\n", + "example": 563, + "start_line": 8432, + "end_line": 8438, + "section": "Links" + }, + { + "markdown": "[foo][bar]\n\n[foo]: /url1\n[bar]: /url2\n", + "html": "<p><a href=\"/url2\">foo</a></p>\n", + "example": 564, + "start_line": 8444, + "end_line": 8451, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url1\n", + "html": "<p><a href=\"/url1\">foo</a></p>\n", + "example": 565, + "start_line": 8453, + "end_line": 8459, + "section": "Links" + }, + { + "markdown": "[foo]()\n\n[foo]: /url1\n", + "html": "<p><a href=\"\">foo</a></p>\n", + "example": 566, + "start_line": 8463, + "end_line": 8469, + "section": "Links" + }, + { + "markdown": "[foo](not a link)\n\n[foo]: /url1\n", + "html": "<p><a href=\"/url1\">foo</a>(not a link)</p>\n", + "example": 567, + "start_line": 8471, + "end_line": 8477, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url\n", + "html": "<p>[foo]<a href=\"/url\">bar</a></p>\n", + "example": 568, + "start_line": 8482, + "end_line": 8488, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2\n", + "html": "<p><a href=\"/url2\">foo</a><a href=\"/url1\">baz</a></p>\n", + "example": 569, + "start_line": 8494, + "end_line": 8501, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2\n", + "html": "<p>[foo]<a href=\"/url1\">bar</a></p>\n", + "example": 570, + "start_line": 8507, + "end_line": 8514, + "section": "Links" + }, + { + "markdown": "![foo](/url \"title\")\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" /></p>\n", + "example": 571, + "start_line": 8530, + "end_line": 8534, + "section": "Images" + }, + { + "markdown": "![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>\n", + "example": 572, + "start_line": 8537, + "end_line": 8543, + "section": "Images" + }, + { + "markdown": "![foo ![bar](/url)](/url2)\n", + "html": "<p><img src=\"/url2\" alt=\"foo bar\" /></p>\n", + "example": 573, + "start_line": 8546, + "end_line": 8550, + "section": "Images" + }, + { + "markdown": "![foo [bar](/url)](/url2)\n", + "html": "<p><img src=\"/url2\" alt=\"foo bar\" /></p>\n", + "example": 574, + "start_line": 8553, + "end_line": 8557, + "section": "Images" + }, + { + "markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>\n", + "example": 575, + "start_line": 8567, + "end_line": 8573, + "section": "Images" + }, + { + "markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n", + "formattedMarkdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"", + "html": "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>\n", + "example": 576, + "start_line": 8576, + "end_line": 8582, + "section": "Images" + }, + { + "markdown": "![foo](train.jpg)\n", + "html": "<p><img src=\"train.jpg\" alt=\"foo\" /></p>\n", + "example": 577, + "start_line": 8585, + "end_line": 8589, + "section": "Images" + }, + { + "markdown": "My ![foo bar](/path/to/train.jpg \"title\" )\n", + "formattedMarkdown": "My ![foo bar](/path/to/train.jpg \"title\")", + "html": "<p>My <img src=\"/path/to/train.jpg\" alt=\"foo bar\" title=\"title\" /></p>\n", + "example": 578, + "start_line": 8592, + "end_line": 8596, + "section": "Images" + }, + { + "markdown": "![foo](<url>)\n", + "formattedMarkdown": "![foo](url)", + "html": "<p><img src=\"url\" alt=\"foo\" /></p>\n", + "example": 579, + "start_line": 8599, + "end_line": 8603, + "section": "Images" + }, + { + "markdown": "![](/url)\n", + "html": "<p><img src=\"/url\" alt=\"\" /></p>\n", + "example": 580, + "start_line": 8606, + "end_line": 8610, + "section": "Images" + }, + { + "markdown": "![foo][bar]\n\n[bar]: /url\n", + "html": "<p><img src=\"/url\" alt=\"foo\" /></p>\n", + "example": 581, + "start_line": 8615, + "end_line": 8621, + "section": "Images" + }, + { + "markdown": "![foo][bar]\n\n[BAR]: /url\n", + "formattedMarkdown": "![foo][bar]\n\n[BAR]: /url", + "html": "<p><img src=\"/url\" alt=\"foo\" /></p>\n", + "example": 582, + "start_line": 8624, + "end_line": 8630, + "section": "Images" + }, + { + "markdown": "![foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" /></p>\n", + "example": 583, + "start_line": 8635, + "end_line": 8641, + "section": "Images" + }, + { + "markdown": "![*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>\n", + "example": 584, + "start_line": 8644, + "end_line": 8650, + "section": "Images" + }, + { + "markdown": "![Foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"Foo\" title=\"title\" /></p>\n", + "example": 585, + "start_line": 8655, + "end_line": 8661, + "section": "Images" + }, + { + "markdown": "![foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" />\n[]</p>\n", + "example": 586, + "start_line": 8667, + "end_line": 8675, + "section": "Images" + }, + { + "markdown": "![foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" /></p>\n", + "example": 587, + "start_line": 8680, + "end_line": 8686, + "section": "Images" + }, + { + "markdown": "![*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>\n", + "example": 588, + "start_line": 8689, + "end_line": 8695, + "section": "Images" + }, + { + "markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n", + "html": "<p>![[foo]]</p>\n<p>[[foo]]: /url "title"</p>\n", + "example": 589, + "start_line": 8700, + "end_line": 8707, + "section": "Images" + }, + { + "markdown": "![Foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"Foo\" title=\"title\" /></p>\n", + "example": 590, + "start_line": 8712, + "end_line": 8718, + "section": "Images" + }, + { + "markdown": "!\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "<p>![foo]</p>\n", + "example": 591, + "start_line": 8724, + "end_line": 8730, + "section": "Images" + }, + { + "markdown": "\\![foo]\n\n[foo]: /url \"title\"\n", + "html": "<p>!<a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 592, + "start_line": 8736, + "end_line": 8742, + "section": "Images" + }, + { + "markdown": "<http://foo.bar.baz>\n", + "html": "<p><a href=\"http://foo.bar.baz\">http://foo.bar.baz</a></p>\n", + "example": 593, + "start_line": 8769, + "end_line": 8773, + "section": "Autolinks" + }, + { + "markdown": "<http://foo.bar.baz/test?q=hello&id=22&boolean>\n", + "html": "<p><a href=\"http://foo.bar.baz/test?q=hello&id=22&boolean\">http://foo.bar.baz/test?q=hello&id=22&boolean</a></p>\n", + "example": 594, + "start_line": 8776, + "end_line": 8780, + "section": "Autolinks" + }, + { + "markdown": "<irc://foo.bar:2233/baz>\n", + "html": "<p><a href=\"irc://foo.bar:2233/baz\">irc://foo.bar:2233/baz</a></p>\n", + "example": 595, + "start_line": 8783, + "end_line": 8787, + "section": "Autolinks" + }, + { + "markdown": "<MAILTO:FOO@BAR.BAZ>\n", + "html": "<p><a href=\"MAILTO:FOO@BAR.BAZ\">MAILTO:FOO@BAR.BAZ</a></p>\n", + "example": 596, + "start_line": 8792, + "end_line": 8796, + "section": "Autolinks" + }, + { + "markdown": "<a+b+c:d>\n", + "html": "<p><a href=\"a+b+c:d\">a+b+c:d</a></p>\n", + "example": 597, + "start_line": 8804, + "end_line": 8808, + "section": "Autolinks" + }, + { + "markdown": "<made-up-scheme://foo,bar>\n", + "html": "<p><a href=\"made-up-scheme://foo,bar\">made-up-scheme://foo,bar</a></p>\n", + "example": 598, + "start_line": 8811, + "end_line": 8815, + "section": "Autolinks" + }, + { + "markdown": "<http://../>\n", + "html": "<p><a href=\"http://../\">http://../</a></p>\n", + "example": 599, + "start_line": 8818, + "end_line": 8822, + "section": "Autolinks" + }, + { + "markdown": "<localhost:5001/foo>\n", + "html": "<p><a href=\"localhost:5001/foo\">localhost:5001/foo</a></p>\n", + "example": 600, + "start_line": 8825, + "end_line": 8829, + "section": "Autolinks" + }, + { + "markdown": "<http://foo.bar/baz bim>\n", + "html": "<p><http://foo.bar/baz bim></p>\n", + "example": 601, + "start_line": 8834, + "end_line": 8838, + "section": "Autolinks" + }, + { + "markdown": "<http://example.com/\\[\\>\n", + "html": "<p><a href=\"http://example.com/%5C%5B%5C\">http://example.com/\\[\\</a></p>\n", + "example": 602, + "start_line": 8843, + "end_line": 8847, + "section": "Autolinks" + }, + { + "markdown": "<foo@bar.example.com>\n", + "html": "<p><a href=\"mailto:foo@bar.example.com\">foo@bar.example.com</a></p>\n", + "example": 603, + "start_line": 8865, + "end_line": 8869, + "section": "Autolinks" + }, + { + "markdown": "<foo+special@Bar.baz-bar0.com>\n", + "html": "<p><a href=\"mailto:foo+special@Bar.baz-bar0.com\">foo+special@Bar.baz-bar0.com</a></p>\n", + "example": 604, + "start_line": 8872, + "end_line": 8876, + "section": "Autolinks" + }, + { + "markdown": "<foo\\+@bar.example.com>\n", + "html": "<p><foo+@bar.example.com></p>\n", + "example": 605, + "start_line": 8881, + "end_line": 8885, + "section": "Autolinks" + }, + { + "markdown": "<>\n", + "html": "<p><></p>\n", + "example": 606, + "start_line": 8890, + "end_line": 8894, + "section": "Autolinks" + }, + { + "markdown": "< http://foo.bar >\n", + "html": "<p>< http://foo.bar ></p>\n", + "example": 607, + "start_line": 8897, + "end_line": 8901, + "section": "Autolinks" + }, + { + "markdown": "<m:abc>\n", + "html": "<p><m:abc></p>\n", + "example": 608, + "start_line": 8904, + "end_line": 8908, + "section": "Autolinks" + }, + { + "markdown": "<foo.bar.baz>\n", + "html": "<p><foo.bar.baz></p>\n", + "example": 609, + "start_line": 8911, + "end_line": 8915, + "section": "Autolinks" + }, + { + "markdown": "http://example.com\n", + "html": "<p>http://example.com</p>\n", + "example": 610, + "start_line": 8918, + "end_line": 8922, + "section": "Autolinks" + }, + { + "markdown": "foo@bar.example.com\n", + "html": "<p>foo@bar.example.com</p>\n", + "example": 611, + "start_line": 8925, + "end_line": 8929, + "section": "Autolinks" + }, + { + "markdown": "<a><bab><c2c>\n", + "html": "<p><a><bab><c2c></p>\n", + "example": 612, + "start_line": 9006, + "end_line": 9010, + "section": "Raw HTML" + }, + { + "markdown": "<a/><b2/>\n", + "html": "<p><a/><b2/></p>\n", + "example": 613, + "start_line": 9015, + "end_line": 9019, + "section": "Raw HTML" + }, + { + "markdown": "<a /><b2\ndata=\"foo\" >\n", + "html": "<p><a /><b2\ndata=\"foo\" ></p>\n", + "example": 614, + "start_line": 9024, + "end_line": 9030, + "section": "Raw HTML" + }, + { + "markdown": "<a foo=\"bar\" bam = 'baz <em>\"</em>'\n_boolean zoop:33=zoop:33 />\n", + "html": "<p><a foo=\"bar\" bam = 'baz <em>\"</em>'\n_boolean zoop:33=zoop:33 /></p>\n", + "example": 615, + "start_line": 9035, + "end_line": 9041, + "section": "Raw HTML" + }, + { + "markdown": "Foo <responsive-image src=\"foo.jpg\" />\n", + "html": "<p>Foo <responsive-image src=\"foo.jpg\" /></p>\n", + "example": 616, + "start_line": 9046, + "end_line": 9050, + "section": "Raw HTML" + }, + { + "markdown": "<33> <__>\n", + "html": "<p><33> <__></p>\n", + "example": 617, + "start_line": 9055, + "end_line": 9059, + "section": "Raw HTML" + }, + { + "markdown": "<a h*#ref=\"hi\">\n", + "html": "<p><a h*#ref="hi"></p>\n", + "example": 618, + "start_line": 9064, + "end_line": 9068, + "section": "Raw HTML" + }, + { + "markdown": "<a href=\"hi'> <a href=hi'>\n", + "html": "<p><a href="hi'> <a href=hi'></p>\n", + "example": 619, + "start_line": 9073, + "end_line": 9077, + "section": "Raw HTML" + }, + { + "markdown": "< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop />\n", + "html": "<p>< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop /></p>\n", + "example": 620, + "start_line": 9082, + "end_line": 9092, + "section": "Raw HTML" + }, + { + "markdown": "<a href='bar'title=title>\n", + "html": "<p><a href='bar'title=title></p>\n", + "example": 621, + "start_line": 9097, + "end_line": 9101, + "section": "Raw HTML" + }, + { + "markdown": "</a></foo >\n", + "html": "<p></a></foo ></p>\n", + "example": 622, + "start_line": 9106, + "end_line": 9110, + "section": "Raw HTML" + }, + { + "markdown": "</a href=\"foo\">\n", + "html": "<p></a href="foo"></p>\n", + "example": 623, + "start_line": 9115, + "end_line": 9119, + "section": "Raw HTML" + }, + { + "markdown": "foo <!-- this is a\ncomment - with hyphen -->\n", + "html": "<p>foo <!-- this is a\ncomment - with hyphen --></p>\n", + "example": 624, + "start_line": 9124, + "end_line": 9130, + "section": "Raw HTML" + }, + { + "markdown": "foo <!-- not a comment -- two hyphens -->\n", + "html": "<p>foo <!-- not a comment -- two hyphens --></p>\n", + "example": 625, + "start_line": 9133, + "end_line": 9137, + "section": "Raw HTML" + }, + { + "markdown": "foo <!--> foo -->\n\nfoo <!-- foo--->\n", + "html": "<p>foo <!--> foo --></p>\n<p>foo <!-- foo---></p>\n", + "example": 626, + "start_line": 9142, + "end_line": 9149, + "section": "Raw HTML" + }, + { + "markdown": "foo <?php echo $a; ?>\n", + "html": "<p>foo <?php echo $a; ?></p>\n", + "example": 627, + "start_line": 9154, + "end_line": 9158, + "section": "Raw HTML" + }, + { + "markdown": "foo <!ELEMENT br EMPTY>\n", + "html": "<p>foo <!ELEMENT br EMPTY></p>\n", + "example": 628, + "start_line": 9163, + "end_line": 9167, + "section": "Raw HTML" + }, + { + "markdown": "foo <![CDATA[>&<]]>\n", + "html": "<p>foo <![CDATA[>&<]]></p>\n", + "example": 629, + "start_line": 9172, + "end_line": 9176, + "section": "Raw HTML" + }, + { + "markdown": "foo <a href=\"ö\">\n", + "html": "<p>foo <a href=\"ö\"></p>\n", + "example": 630, + "start_line": 9182, + "end_line": 9186, + "section": "Raw HTML" + }, + { + "markdown": "foo <a href=\"\\*\">\n", + "html": "<p>foo <a href=\"\\*\"></p>\n", + "example": 631, + "start_line": 9191, + "end_line": 9195, + "section": "Raw HTML" + }, + { + "markdown": "<a href=\"\\\"\">\n", + "html": "<p><a href="""></p>\n", + "example": 632, + "start_line": 9198, + "end_line": 9202, + "section": "Raw HTML" + }, + { + "markdown": "foo \nbaz\n", + "html": "<p>foo<br />\nbaz</p>\n", + "example": 633, + "start_line": 9212, + "end_line": 9218, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\nbaz\n", + "html": "<p>foo<br />\nbaz</p>\n", + "example": 634, + "start_line": 9224, + "end_line": 9230, + "section": "Hard line breaks" + }, + { + "markdown": "foo \nbaz\n", + "html": "<p>foo<br />\nbaz</p>\n", + "example": 635, + "start_line": 9235, + "end_line": 9241, + "section": "Hard line breaks" + }, + { + "markdown": "foo \n bar\n", + "formattedMarkdown": "foo \nbar", + "html": "<p>foo<br />\nbar</p>\n", + "example": 636, + "start_line": 9246, + "end_line": 9252, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\n bar\n", + "formattedMarkdown": "foo\\\nbar", + "html": "<p>foo<br />\nbar</p>\n", + "example": 637, + "start_line": 9255, + "end_line": 9261, + "section": "Hard line breaks" + }, + { + "markdown": "*foo \nbar*\n", + "html": "<p><em>foo<br />\nbar</em></p>\n", + "example": 638, + "start_line": 9267, + "end_line": 9273, + "section": "Hard line breaks" + }, + { + "markdown": "*foo\\\nbar*\n", + "html": "<p><em>foo<br />\nbar</em></p>\n", + "example": 639, + "start_line": 9276, + "end_line": 9282, + "section": "Hard line breaks" + }, + { + "markdown": "`code \nspan`\n", + "html": "<p><code>code span</code></p>\n", + "example": 640, + "start_line": 9287, + "end_line": 9292, + "section": "Hard line breaks" + }, + { + "markdown": "`code\\\nspan`\n", + "html": "<p><code>code\\ span</code></p>\n", + "example": 641, + "start_line": 9295, + "end_line": 9300, + "section": "Hard line breaks" + }, + { + "markdown": "<a href=\"foo \nbar\">\n", + "html": "<p><a href=\"foo \nbar\"></p>\n", + "example": 642, + "start_line": 9305, + "end_line": 9311, + "section": "Hard line breaks" + }, + { + "markdown": "<a href=\"foo\\\nbar\">\n", + "html": "<p><a href=\"foo\\\nbar\"></p>\n", + "example": 643, + "start_line": 9314, + "end_line": 9320, + "section": "Hard line breaks" + }, + { + "markdown": "foo\\\n", + "html": "<p>foo\\</p>\n", + "example": 644, + "start_line": 9327, + "end_line": 9331, + "section": "Hard line breaks" + }, + { + "markdown": "foo \n", + "html": "<p>foo</p>\n", + "example": 645, + "start_line": 9334, + "end_line": 9338, + "section": "Hard line breaks" + }, + { + "markdown": "### foo\\\n", + "html": "<h3>foo\\</h3>\n", + "example": 646, + "start_line": 9341, + "end_line": 9345, + "section": "Hard line breaks" + }, + { + "markdown": "### foo \n", + "formattedMarkdown": "### foo", + "html": "<h3>foo</h3>\n", + "example": 647, + "start_line": 9348, + "end_line": 9352, + "section": "Hard line breaks" + }, + { + "markdown": "foo\nbaz\n", + "html": "<p>foo\nbaz</p>\n", + "example": 648, + "start_line": 9363, + "end_line": 9369, + "section": "Soft line breaks" + }, + { + "markdown": "foo \n baz\n", + "formattedMarkdown": "foo \nbaz", + "html": "<p>foo\nbaz</p>\n", + "example": 649, + "start_line": 9375, + "end_line": 9381, + "section": "Soft line breaks" + }, + { + "markdown": "hello $.;'there\n", + "html": "<p>hello $.;'there</p>\n", + "example": 650, + "start_line": 9395, + "end_line": 9399, + "section": "Textual content" + }, + { + "markdown": "Foo χρῆν\n", + "html": "<p>Foo χρῆν</p>\n", + "example": 651, + "start_line": 9402, + "end_line": 9406, + "section": "Textual content" + }, + { + "markdown": "Multiple spaces\n", + "html": "<p>Multiple spaces</p>\n", + "example": 652, + "start_line": 9411, + "end_line": 9415, + "section": "Textual content" + } +] \ No newline at end of file diff --git a/markdown/tests/spec/gfm_spec.json b/markdown/tests/spec/gfm_spec.json new file mode 100644 index 00000000000..5986baa258e --- /dev/null +++ b/markdown/tests/spec/gfm_spec.json @@ -0,0 +1,6217 @@ +[ + { + "markdown": "\tfoo\tbaz\t\tbim\n", + "formattedMarkdown": " foo\tbaz\t\tbim", + "html": "<pre><code>foo\tbaz\t\tbim\n</code></pre>\n", + "example": 1, + "start_line": 368, + "end_line": 373, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": " \tfoo\tbaz\t\tbim\n", + "formattedMarkdown": " foo\tbaz\t\tbim", + "html": "<pre><code>foo\tbaz\t\tbim\n</code></pre>\n", + "example": 2, + "start_line": 375, + "end_line": 380, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": " a\ta\n \u1f50\ta\n", + "html": "<pre><code>a\ta\n\u1f50\ta\n</code></pre>\n", + "example": 3, + "start_line": 382, + "end_line": 389, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": " - foo\n\n\tbar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 4, + "start_line": 395, + "end_line": 406, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": "- foo\n\n\t\tbar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<pre><code> bar\n</code></pre>\n</li>\n</ul>\n", + "example": 5, + "start_line": 408, + "end_line": 420, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": ">\t\tfoo\n", + "formattedMarkdown": "> foo", + "html": "<blockquote>\n<pre><code> foo\n</code></pre>\n</blockquote>\n", + "example": 6, + "start_line": 431, + "end_line": 438, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": "-\t\tfoo\n", + "formattedMarkdown": "- foo", + "html": "<ul>\n<li>\n<pre><code> foo\n</code></pre>\n</li>\n</ul>\n", + "example": 7, + "start_line": 440, + "end_line": 449, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": " foo\n\tbar\n", + "formattedMarkdown": " foo\n bar", + "html": "<pre><code>foo\nbar\n</code></pre>\n", + "example": 8, + "start_line": 452, + "end_line": 459, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": " - foo\n - bar\n\t - baz\n", + "formattedMarkdown": "- foo\n - bar\n - baz", + "html": "<ul>\n<li>foo\n<ul>\n<li>bar\n<ul>\n<li>baz</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n", + "example": 9, + "start_line": 461, + "end_line": 477, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": "#\tFoo\n", + "formattedMarkdown": "# Foo", + "html": "<h1>Foo</h1>\n", + "example": 10, + "start_line": 479, + "end_line": 483, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": "*\t*\t*\t\n", + "html": "<hr />\n", + "example": 11, + "start_line": 485, + "end_line": 489, + "section": "Tabs", + "extensions": [] + }, + { + "markdown": "- `one\n- two`\n", + "html": "<ul>\n<li>`one</li>\n<li>two`</li>\n</ul>\n", + "example": 12, + "start_line": 512, + "end_line": 520, + "section": "Precedence", + "extensions": [] + }, + { + "markdown": "***\n---\n___\n", + "html": "<hr />\n<hr />\n<hr />\n", + "example": 13, + "start_line": 551, + "end_line": 559, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "+++\n", + "html": "<p>+++</p>\n", + "example": 14, + "start_line": 564, + "end_line": 568, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "===\n", + "html": "<p>===</p>\n", + "example": 15, + "start_line": 571, + "end_line": 575, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "--\n**\n__\n", + "html": "<p>--\n**\n__</p>\n", + "example": 16, + "start_line": 580, + "end_line": 588, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": " ***\n ***\n ***\n", + "formattedMarkdown": "***\n***\n***", + "html": "<hr />\n<hr />\n<hr />\n", + "example": 17, + "start_line": 593, + "end_line": 601, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": " ***\n", + "html": "<pre><code>***\n</code></pre>\n", + "example": 18, + "start_line": 606, + "end_line": 611, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "Foo\n ***\n", + "formattedMarkdown": "Foo\n\\***", + "html": "<p>Foo\n***</p>\n", + "example": 19, + "start_line": 614, + "end_line": 620, + "section": "Thematic breaks", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": "_____________________________________\n", + "html": "<hr />\n", + "example": 20, + "start_line": 625, + "end_line": 629, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": " - - -\n", + "formattedMarkdown": "- - -", + "html": "<hr />\n", + "example": 21, + "start_line": 634, + "end_line": 638, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": " ** * ** * ** * **\n", + "formattedMarkdown": "** * ** * ** * **", + "html": "<hr />\n", + "example": 22, + "start_line": 641, + "end_line": 645, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "- - - -\n", + "html": "<hr />\n", + "example": 23, + "start_line": 648, + "end_line": 652, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "- - - - \n", + "html": "<hr />\n", + "example": 24, + "start_line": 657, + "end_line": 661, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "_ _ _ _ a\n\na------\n\n---a---\n", + "html": "<p>_ _ _ _ a</p>\n<p>a------</p>\n<p>---a---</p>\n", + "example": 25, + "start_line": 666, + "end_line": 676, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": " *-*\n", + "formattedMarkdown": "*-*", + "html": "<p><em>-</em></p>\n", + "example": 26, + "start_line": 682, + "end_line": 686, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "- foo\n***\n- bar\n", + "html": "<ul>\n<li>foo</li>\n</ul>\n<hr />\n<ul>\n<li>bar</li>\n</ul>\n", + "example": 27, + "start_line": 691, + "end_line": 703, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "Foo\n***\nbar\n", + "html": "<p>Foo</p>\n<hr />\n<p>bar</p>\n", + "example": 28, + "start_line": 708, + "end_line": 716, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "Foo\n---\nbar\n", + "html": "<h2>Foo</h2>\n<p>bar</p>\n", + "example": 29, + "start_line": 725, + "end_line": 732, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "* Foo\n* * *\n* Bar\n", + "html": "<ul>\n<li>Foo</li>\n</ul>\n<hr />\n<ul>\n<li>Bar</li>\n</ul>\n", + "example": 30, + "start_line": 738, + "end_line": 750, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "- Foo\n- * * *\n", + "html": "<ul>\n<li>Foo</li>\n<li>\n<hr />\n</li>\n</ul>\n", + "example": 31, + "start_line": 755, + "end_line": 765, + "section": "Thematic breaks", + "extensions": [] + }, + { + "markdown": "# foo\n## foo\n### foo\n#### foo\n##### foo\n###### foo\n", + "html": "<h1>foo</h1>\n<h2>foo</h2>\n<h3>foo</h3>\n<h4>foo</h4>\n<h5>foo</h5>\n<h6>foo</h6>\n", + "example": 32, + "start_line": 784, + "end_line": 798, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "####### foo\n", + "html": "<p>####### foo</p>\n", + "example": 33, + "start_line": 803, + "end_line": 807, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "#5 bolt\n\n#hashtag\n", + "html": "<p>#5 bolt</p>\n<p>#hashtag</p>\n", + "example": 34, + "start_line": 818, + "end_line": 825, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "\\## foo\n", + "html": "<p>## foo</p>\n", + "example": 35, + "start_line": 830, + "end_line": 834, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "# foo *bar* \\*baz\\*\n", + "html": "<h1>foo <em>bar</em> *baz*</h1>\n", + "example": 36, + "start_line": 839, + "end_line": 843, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "# foo \n", + "formattedMarkdown": "# foo", + "html": "<h1>foo</h1>\n", + "example": 37, + "start_line": 848, + "end_line": 852, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": " ### foo\n ## foo\n # foo\n", + "formattedMarkdown": "### foo\n## foo\n# foo", + "html": "<h3>foo</h3>\n<h2>foo</h2>\n<h1>foo</h1>\n", + "example": 38, + "start_line": 857, + "end_line": 865, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": " # foo\n", + "html": "<pre><code># foo\n</code></pre>\n", + "example": 39, + "start_line": 870, + "end_line": 875, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "foo\n # bar\n", + "formattedMarkdown": "foo\n\\# bar", + "html": "<p>foo\n# bar</p>\n", + "example": 40, + "start_line": 878, + "end_line": 884, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "## foo ##\n ### bar ###\n", + "formattedMarkdown": "## foo\n### bar", + "html": "<h2>foo</h2>\n<h3>bar</h3>\n", + "example": 41, + "start_line": 889, + "end_line": 895, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "# foo ##################################\n##### foo ##\n", + "formattedMarkdown": "# foo\n##### foo", + "html": "<h1>foo</h1>\n<h5>foo</h5>\n", + "example": 42, + "start_line": 900, + "end_line": 906, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "### foo ### \n", + "formattedMarkdown": "### foo", + "html": "<h3>foo</h3>\n", + "example": 43, + "start_line": 911, + "end_line": 915, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "### foo ### b\n", + "html": "<h3>foo ### b</h3>\n", + "example": 44, + "start_line": 922, + "end_line": 926, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "# foo#\n", + "html": "<h1>foo#</h1>\n", + "example": 45, + "start_line": 931, + "end_line": 935, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "### foo \\###\n## foo #\\##\n# foo \\#\n", + "html": "<h3>foo ###</h3>\n<h2>foo ###</h2>\n<h1>foo #</h1>\n", + "example": 46, + "start_line": 941, + "end_line": 949, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "****\n## foo\n****\n", + "html": "<hr />\n<h2>foo</h2>\n<hr />\n", + "example": 47, + "start_line": 955, + "end_line": 963, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "Foo bar\n# baz\nBar foo\n", + "html": "<p>Foo bar</p>\n<h1>baz</h1>\n<p>Bar foo</p>\n", + "example": 48, + "start_line": 966, + "end_line": 974, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "## \n#\n### ###\n", + "formattedMarkdown": "##\n#\n###", + "html": "<h2></h2>\n<h1></h1>\n<h3></h3>\n", + "example": 49, + "start_line": 979, + "end_line": 987, + "section": "ATX headings", + "extensions": [] + }, + { + "markdown": "Foo *bar*\n=========\n\nFoo *bar*\n---------\n", + "html": "<h1>Foo <em>bar</em></h1>\n<h2>Foo <em>bar</em></h2>\n", + "example": 50, + "start_line": 1019, + "end_line": 1028, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo *bar\nbaz*\n====\n", + "html": "<h1>Foo <em>bar\nbaz</em></h1>\n", + "example": 51, + "start_line": 1033, + "end_line": 1040, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": " Foo *bar\nbaz*\t\n====\n", + "formattedMarkdown": "Foo *bar\nbaz*\n====", + "html": "<h1>Foo <em>bar\nbaz</em></h1>\n", + "example": 52, + "start_line": 1047, + "end_line": 1054, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\n-------------------------\n\nFoo\n=\n", + "html": "<h2>Foo</h2>\n<h1>Foo</h1>\n", + "example": 53, + "start_line": 1059, + "end_line": 1068, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": " Foo\n---\n\n Foo\n-----\n\n Foo\n ===\n", + "formattedMarkdown": "Foo\n---\n\nFoo\n-----\n\nFoo\n===", + "html": "<h2>Foo</h2>\n<h2>Foo</h2>\n<h1>Foo</h1>\n", + "example": 54, + "start_line": 1074, + "end_line": 1087, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": " Foo\n ---\n\n Foo\n---\n", + "html": "<pre><code>Foo\n---\n\nFoo\n</code></pre>\n<hr />\n", + "example": 55, + "start_line": 1092, + "end_line": 1105, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\n ---- \n", + "formattedMarkdown": "Foo\n----", + "html": "<h2>Foo</h2>\n", + "example": 56, + "start_line": 1111, + "end_line": 1116, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\n ---\n", + "formattedMarkdown": "Foo\n\\---", + "html": "<p>Foo\n---</p>\n", + "example": 57, + "start_line": 1121, + "end_line": 1127, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\n= =\n\nFoo\n--- -\n", + "html": "<p>Foo\n= =</p>\n<p>Foo</p>\n<hr />\n", + "example": 58, + "start_line": 1132, + "end_line": 1143, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo \n-----\n", + "formattedMarkdown": "Foo\n-----", + "html": "<h2>Foo</h2>\n", + "example": 59, + "start_line": 1148, + "end_line": 1153, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\\\n----\n", + "html": "<h2>Foo\\</h2>\n", + "example": 60, + "start_line": 1158, + "end_line": 1163, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "`Foo\n----\n`\n\n<a title=\"a lot\n---\nof dashes\"/>\n", + "html": "<h2>`Foo</h2>\n<p>`</p>\n<h2><a title="a lot</h2>\n<p>of dashes"/></p>\n", + "example": 61, + "start_line": 1169, + "end_line": 1182, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "> Foo\n---\n", + "html": "<blockquote>\n<p>Foo</p>\n</blockquote>\n<hr />\n", + "example": 62, + "start_line": 1188, + "end_line": 1196, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "> foo\nbar\n===\n", + "formattedMarkdown": "> foo\n> bar\n> \\===", + "html": "<blockquote>\n<p>foo\nbar\n===</p>\n</blockquote>\n", + "example": 63, + "start_line": 1199, + "end_line": 1209, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "- Foo\n---\n", + "html": "<ul>\n<li>Foo</li>\n</ul>\n<hr />\n", + "example": 64, + "start_line": 1212, + "end_line": 1220, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\nBar\n---\n", + "html": "<h2>Foo\nBar</h2>\n", + "example": 65, + "start_line": 1227, + "end_line": 1234, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "---\nFoo\n---\nBar\n---\nBaz\n", + "html": "<hr />\n<h2>Foo</h2>\n<h2>Bar</h2>\n<p>Baz</p>\n", + "example": 66, + "start_line": 1240, + "end_line": 1252, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "\n====\n", + "formattedMarkdown": "====", + "html": "<p>====</p>\n", + "example": 67, + "start_line": 1257, + "end_line": 1262, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "---\n---\n", + "html": "<hr />\n<hr />\n", + "example": 68, + "start_line": 1269, + "end_line": 1275, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "- foo\n-----\n", + "html": "<ul>\n<li>foo</li>\n</ul>\n<hr />\n", + "example": 69, + "start_line": 1278, + "end_line": 1286, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": " foo\n---\n", + "html": "<pre><code>foo\n</code></pre>\n<hr />\n", + "example": 70, + "start_line": 1289, + "end_line": 1296, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "> foo\n-----\n", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n<hr />\n", + "example": 71, + "start_line": 1299, + "end_line": 1307, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "\\> foo\n------\n", + "html": "<h2>> foo</h2>\n", + "example": 72, + "start_line": 1313, + "end_line": 1318, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\n\nbar\n---\nbaz\n", + "html": "<p>Foo</p>\n<h2>bar</h2>\n<p>baz</p>\n", + "example": 73, + "start_line": 1344, + "end_line": 1354, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\nbar\n\n---\n\nbaz\n", + "html": "<p>Foo\nbar</p>\n<hr />\n<p>baz</p>\n", + "example": 74, + "start_line": 1360, + "end_line": 1372, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\nbar\n* * *\nbaz\n", + "html": "<p>Foo\nbar</p>\n<hr />\n<p>baz</p>\n", + "example": 75, + "start_line": 1378, + "end_line": 1388, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": "Foo\nbar\n\\---\nbaz\n", + "html": "<p>Foo\nbar\n---\nbaz</p>\n", + "example": 76, + "start_line": 1393, + "end_line": 1403, + "section": "Setext headings", + "extensions": [] + }, + { + "markdown": " a simple\n indented code block\n", + "html": "<pre><code>a simple\n indented code block\n</code></pre>\n", + "example": 77, + "start_line": 1421, + "end_line": 1428, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": " - foo\n\n bar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 78, + "start_line": 1435, + "end_line": 1446, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": "1. foo\n\n - bar\n", + "formattedMarkdown": "1. foo\n\n - bar", + "html": "<ol>\n<li>\n<p>foo</p>\n<ul>\n<li>bar</li>\n</ul>\n</li>\n</ol>\n", + "example": 79, + "start_line": 1449, + "end_line": 1462, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": " <a/>\n *hi*\n\n - one\n", + "html": "<pre><code><a/>\n*hi*\n\n- one\n</code></pre>\n", + "example": 80, + "start_line": 1469, + "end_line": 1480, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": " chunk1\n\n chunk2\n \n \n \n chunk3\n", + "formattedMarkdown": " chunk1\n\n chunk2\n\n\n\n chunk3", + "html": "<pre><code>chunk1\n\nchunk2\n\n\n\nchunk3\n</code></pre>\n", + "example": 81, + "start_line": 1485, + "end_line": 1502, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": " chunk1\n \n chunk2\n", + "formattedMarkdown": " chunk1\n\n chunk2", + "html": "<pre><code>chunk1\n \n chunk2\n</code></pre>\n", + "example": 82, + "start_line": 1508, + "end_line": 1517, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": "Foo\n bar\n\n", + "formattedMarkdown": "Foo\nbar", + "html": "<p>Foo\nbar</p>\n", + "example": 83, + "start_line": 1523, + "end_line": 1530, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": " foo\nbar\n", + "html": "<pre><code>foo\n</code></pre>\n<p>bar</p>\n", + "example": 84, + "start_line": 1537, + "end_line": 1544, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": "# Heading\n foo\nHeading\n------\n foo\n----\n", + "html": "<h1>Heading</h1>\n<pre><code>foo\n</code></pre>\n<h2>Heading</h2>\n<pre><code>foo\n</code></pre>\n<hr />\n", + "example": 85, + "start_line": 1550, + "end_line": 1565, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": " foo\n bar\n", + "html": "<pre><code> foo\nbar\n</code></pre>\n", + "example": 86, + "start_line": 1570, + "end_line": 1577, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": "\n \n foo\n \n\n", + "formattedMarkdown": " foo", + "html": "<pre><code>foo\n</code></pre>\n", + "example": 87, + "start_line": 1583, + "end_line": 1592, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": " foo \n", + "formattedMarkdown": " foo", + "html": "<pre><code>foo \n</code></pre>\n", + "example": 88, + "start_line": 1597, + "end_line": 1602, + "section": "Indented code blocks", + "extensions": [] + }, + { + "markdown": "```\n<\n >\n```\n", + "html": "<pre><code><\n >\n</code></pre>\n", + "example": 89, + "start_line": 1652, + "end_line": 1661, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "~~~\n<\n >\n~~~\n", + "html": "<pre><code><\n >\n</code></pre>\n", + "example": 90, + "start_line": 1666, + "end_line": 1675, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "``\nfoo\n``\n", + "html": "<p><code>foo</code></p>\n", + "example": 91, + "start_line": 1679, + "end_line": 1685, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```\naaa\n~~~\n```\n", + "html": "<pre><code>aaa\n~~~\n</code></pre>\n", + "example": 92, + "start_line": 1690, + "end_line": 1699, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "~~~\naaa\n```\n~~~\n", + "html": "<pre><code>aaa\n```\n</code></pre>\n", + "example": 93, + "start_line": 1702, + "end_line": 1711, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "````\naaa\n```\n``````\n", + "formattedMarkdown": "````\naaa\n```\n````", + "html": "<pre><code>aaa\n```\n</code></pre>\n", + "example": 94, + "start_line": 1716, + "end_line": 1725, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "~~~~\naaa\n~~~\n~~~~\n", + "html": "<pre><code>aaa\n~~~\n</code></pre>\n", + "example": 95, + "start_line": 1728, + "end_line": 1737, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```\n", + "formattedMarkdown": "```\n```", + "html": "<pre><code></code></pre>\n", + "example": 96, + "start_line": 1743, + "end_line": 1747, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "`````\n\n```\naaa\n", + "formattedMarkdown": "`````\n\n```\naaa\n`````", + "html": "<pre><code>\n```\naaa\n</code></pre>\n", + "example": 97, + "start_line": 1750, + "end_line": 1760, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "> ```\n> aaa\n\nbbb\n", + "formattedMarkdown": "> ```\n> aaa\n> ```\n\nbbb", + "html": "<blockquote>\n<pre><code>aaa\n</code></pre>\n</blockquote>\n<p>bbb</p>\n", + "example": 98, + "start_line": 1763, + "end_line": 1774, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```\n\n \n```\n", + "formattedMarkdown": "```\n```", + "html": "<pre><code>\n \n</code></pre>\n", + "example": 99, + "start_line": 1779, + "end_line": 1788, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```\n```\n", + "html": "<pre><code></code></pre>\n", + "example": 100, + "start_line": 1793, + "end_line": 1798, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": " ```\n aaa\naaa\n```\n", + "formattedMarkdown": "```\naaa\naaa\n```", + "html": "<pre><code>aaa\naaa\n</code></pre>\n", + "example": 101, + "start_line": 1805, + "end_line": 1814, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": " ```\naaa\n aaa\naaa\n ```\n", + "formattedMarkdown": "```\naaa\naaa\naaa\n```", + "html": "<pre><code>aaa\naaa\naaa\n</code></pre>\n", + "example": 102, + "start_line": 1817, + "end_line": 1828, + "section": "Fenced code blocks", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": " ```\n aaa\n aaa\n aaa\n ```\n", + "formattedMarkdown": "```\naaa\n aaa\naaa\n```", + "html": "<pre><code>aaa\n aaa\naaa\n</code></pre>\n", + "example": 103, + "start_line": 1831, + "end_line": 1842, + "section": "Fenced code blocks", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": " ```\n aaa\n ```\n", + "html": "<pre><code>```\naaa\n```\n</code></pre>\n", + "example": 104, + "start_line": 1847, + "end_line": 1856, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```\naaa\n ```\n", + "formattedMarkdown": "```\naaa\n```", + "html": "<pre><code>aaa\n</code></pre>\n", + "example": 105, + "start_line": 1862, + "end_line": 1869, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": " ```\naaa\n ```\n", + "formattedMarkdown": "```\naaa\n```", + "html": "<pre><code>aaa\n</code></pre>\n", + "example": 106, + "start_line": 1872, + "end_line": 1879, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```\naaa\n ```\n", + "formattedMarkdown": "```\naaa\n ```\n```", + "html": "<pre><code>aaa\n ```\n</code></pre>\n", + "example": 107, + "start_line": 1884, + "end_line": 1892, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "``` ```\naaa\n", + "html": "<p><code> </code>\naaa</p>\n", + "example": 108, + "start_line": 1898, + "end_line": 1904, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "~~~~~~\naaa\n~~~ ~~\n", + "formattedMarkdown": "~~~~~~\naaa\n~~~ ~~\n~~~~~~", + "html": "<pre><code>aaa\n~~~ ~~\n</code></pre>\n", + "example": 109, + "start_line": 1907, + "end_line": 1915, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "foo\n```\nbar\n```\nbaz\n", + "html": "<p>foo</p>\n<pre><code>bar\n</code></pre>\n<p>baz</p>\n", + "example": 110, + "start_line": 1921, + "end_line": 1932, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "foo\n---\n~~~\nbar\n~~~\n# baz\n", + "html": "<h2>foo</h2>\n<pre><code>bar\n</code></pre>\n<h1>baz</h1>\n", + "example": 111, + "start_line": 1938, + "end_line": 1950, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```ruby\ndef foo(x)\n return 3\nend\n```\n", + "html": "<pre><code class=\"language-ruby\">def foo(x)\n return 3\nend\n</code></pre>\n", + "example": 112, + "start_line": 1960, + "end_line": 1971, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~\n", + "formattedMarkdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~", + "html": "<pre><code class=\"language-ruby\">def foo(x)\n return 3\nend\n</code></pre>\n", + "example": 113, + "start_line": 1974, + "end_line": 1985, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "````;\n````\n", + "html": "<pre><code class=\"language-;\"></code></pre>\n", + "example": 114, + "start_line": 1988, + "end_line": 1993, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "``` aa ```\nfoo\n", + "html": "<p><code>aa</code>\nfoo</p>\n", + "example": 115, + "start_line": 1998, + "end_line": 2004, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "~~~ aa ``` ~~~\nfoo\n~~~\n", + "html": "<pre><code class=\"language-aa\">foo\n</code></pre>\n", + "example": 116, + "start_line": 2009, + "end_line": 2016, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "```\n``` aaa\n```\n", + "html": "<pre><code>``` aaa\n</code></pre>\n", + "example": 117, + "start_line": 2021, + "end_line": 2028, + "section": "Fenced code blocks", + "extensions": [] + }, + { + "markdown": "<table><tr><td>\n<pre>\n**Hello**,\n\n_world_.\n</pre>\n</td></tr></table>\n", + "html": "<table><tr><td>\n<pre>\n**Hello**,\n<p><em>world</em>.\n</pre></p>\n</td></tr></table>\n", + "example": 118, + "start_line": 2100, + "end_line": 2115, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<table>\n <tr>\n <td>\n hi\n </td>\n </tr>\n</table>\n\nokay.\n", + "html": "<table>\n <tr>\n <td>\n hi\n </td>\n </tr>\n</table>\n<p>okay.</p>\n", + "example": 119, + "start_line": 2129, + "end_line": 2148, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": " <div>\n *hello*\n <foo><a>\n", + "formattedMarkdown": "<div>\n *hello*\n <foo><a>", + "html": " <div>\n *hello*\n <foo><a>\n", + "example": 120, + "start_line": 2151, + "end_line": 2159, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "</div>\n*foo*\n", + "html": "</div>\n*foo*\n", + "example": 121, + "start_line": 2164, + "end_line": 2170, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<DIV CLASS=\"foo\">\n\n*Markdown*\n\n</DIV>\n", + "html": "<DIV CLASS=\"foo\">\n<p><em>Markdown</em></p>\n</DIV>\n", + "example": 122, + "start_line": 2175, + "end_line": 2185, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div id=\"foo\"\n class=\"bar\">\n</div>\n", + "html": "<div id=\"foo\"\n class=\"bar\">\n</div>\n", + "example": 123, + "start_line": 2191, + "end_line": 2199, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div id=\"foo\" class=\"bar\n baz\">\n</div>\n", + "html": "<div id=\"foo\" class=\"bar\n baz\">\n</div>\n", + "example": 124, + "start_line": 2202, + "end_line": 2210, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div>\n*foo*\n\n*bar*\n", + "html": "<div>\n*foo*\n<p><em>bar</em></p>\n", + "example": 125, + "start_line": 2214, + "end_line": 2223, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div id=\"foo\"\n*hi*\n", + "html": "<div id=\"foo\"\n*hi*\n", + "example": 126, + "start_line": 2230, + "end_line": 2236, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div class\nfoo\n", + "html": "<div class\nfoo\n", + "example": 127, + "start_line": 2239, + "end_line": 2245, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div *???-&&&-<---\n*foo*\n", + "html": "<div *???-&&&-<---\n*foo*\n", + "example": 128, + "start_line": 2251, + "end_line": 2257, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div><a href=\"bar\">*foo*</a></div>\n", + "html": "<div><a href=\"bar\">*foo*</a></div>\n", + "example": 129, + "start_line": 2263, + "end_line": 2267, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<table><tr><td>\nfoo\n</td></tr></table>\n", + "html": "<table><tr><td>\nfoo\n</td></tr></table>\n", + "example": 130, + "start_line": 2270, + "end_line": 2278, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div></div>\n``` c\nint x = 33;\n```\n", + "html": "<div></div>\n``` c\nint x = 33;\n```\n", + "example": 131, + "start_line": 2287, + "end_line": 2297, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<a href=\"foo\">\n*bar*\n</a>\n", + "html": "<a href=\"foo\">\n*bar*\n</a>\n", + "example": 132, + "start_line": 2304, + "end_line": 2312, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<Warning>\n*bar*\n</Warning>\n", + "html": "<Warning>\n*bar*\n</Warning>\n", + "example": 133, + "start_line": 2317, + "end_line": 2325, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<i class=\"foo\">\n*bar*\n</i>\n", + "html": "<i class=\"foo\">\n*bar*\n</i>\n", + "example": 134, + "start_line": 2328, + "end_line": 2336, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "</ins>\n*bar*\n", + "html": "</ins>\n*bar*\n", + "example": 135, + "start_line": 2339, + "end_line": 2345, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<del>\n*foo*\n</del>\n", + "html": "<del>\n*foo*\n</del>\n", + "example": 136, + "start_line": 2354, + "end_line": 2362, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<del>\n\n*foo*\n\n</del>\n", + "html": "<del>\n<p><em>foo</em></p>\n</del>\n", + "example": 137, + "start_line": 2369, + "end_line": 2379, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<del>*foo*</del>\n", + "html": "<p><del><em>foo</em></del></p>\n", + "example": 138, + "start_line": 2387, + "end_line": 2391, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<pre language=\"haskell\"><code>\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n</code></pre>\nokay\n", + "html": "<pre language=\"haskell\"><code>\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n</code></pre>\n<p>okay</p>\n", + "example": 139, + "start_line": 2403, + "end_line": 2419, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<script type=\"text/javascript\">\n// JavaScript example\n\ndocument.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n</script>\nokay\n", + "html": "<script type=\"text/javascript\">\n// JavaScript example\n\ndocument.getElementById(\"demo\").innerHTML = \"Hello JavaScript!\";\n</script>\n<p>okay</p>\n", + "example": 140, + "start_line": 2424, + "end_line": 2438, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<style\n type=\"text/css\">\nh1 {color:red;}\n\np {color:blue;}\n</style>\nokay\n", + "html": "<style\n type=\"text/css\">\nh1 {color:red;}\n\np {color:blue;}\n</style>\n<p>okay</p>\n", + "example": 141, + "start_line": 2443, + "end_line": 2459, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<style\n type=\"text/css\">\n\nfoo\n", + "html": "<style\n type=\"text/css\">\n\nfoo\n", + "example": 142, + "start_line": 2466, + "end_line": 2476, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "> <div>\n> foo\n\nbar\n", + "html": "<blockquote>\n<div>\nfoo\n</blockquote>\n<p>bar</p>\n", + "example": 143, + "start_line": 2479, + "end_line": 2490, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "- <div>\n- foo\n", + "html": "<ul>\n<li>\n<div>\n</li>\n<li>foo</li>\n</ul>\n", + "example": 144, + "start_line": 2493, + "end_line": 2503, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<style>p{color:red;}</style>\n*foo*\n", + "html": "<style>p{color:red;}</style>\n<p><em>foo</em></p>\n", + "example": 145, + "start_line": 2508, + "end_line": 2514, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<!-- foo -->*bar*\n*baz*\n", + "html": "<!-- foo -->*bar*\n<p><em>baz</em></p>\n", + "example": 146, + "start_line": 2517, + "end_line": 2523, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<script>\nfoo\n</script>1. *bar*\n", + "html": "<script>\nfoo\n</script>1. *bar*\n", + "example": 147, + "start_line": 2529, + "end_line": 2537, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<!-- Foo\n\nbar\n baz -->\nokay\n", + "html": "<!-- Foo\n\nbar\n baz -->\n<p>okay</p>\n", + "example": 148, + "start_line": 2542, + "end_line": 2554, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<?php\n\n echo '>';\n\n?>\nokay\n", + "html": "<?php\n\n echo '>';\n\n?>\n<p>okay</p>\n", + "example": 149, + "start_line": 2560, + "end_line": 2574, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<!DOCTYPE html>\n", + "html": "<!DOCTYPE html>\n", + "example": 150, + "start_line": 2579, + "end_line": 2583, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\nokay\n", + "html": "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\n<p>okay</p>\n", + "example": 151, + "start_line": 2588, + "end_line": 2616, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": " <!-- foo -->\n\n <!-- foo -->\n", + "formattedMarkdown": "<!-- foo -->\n\n <!-- foo -->", + "html": " <!-- foo -->\n<pre><code><!-- foo -->\n</code></pre>\n", + "example": 152, + "start_line": 2621, + "end_line": 2629, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": " <div>\n\n <div>\n", + "formattedMarkdown": "<div>\n\n <div>", + "html": " <div>\n<pre><code><div>\n</code></pre>\n", + "example": 153, + "start_line": 2632, + "end_line": 2640, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "Foo\n<div>\nbar\n</div>\n", + "html": "<p>Foo</p>\n<div>\nbar\n</div>\n", + "example": 154, + "start_line": 2646, + "end_line": 2656, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div>\nbar\n</div>\n*foo*\n", + "html": "<div>\nbar\n</div>\n*foo*\n", + "example": 155, + "start_line": 2663, + "end_line": 2673, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "Foo\n<a href=\"bar\">\nbaz\n", + "html": "<p>Foo\n<a href=\"bar\">\nbaz</p>\n", + "example": 156, + "start_line": 2678, + "end_line": 2686, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div>\n\n*Emphasized* text.\n\n</div>\n", + "html": "<div>\n<p><em>Emphasized</em> text.</p>\n</div>\n", + "example": 157, + "start_line": 2719, + "end_line": 2729, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<div>\n*Emphasized* text.\n</div>\n", + "html": "<div>\n*Emphasized* text.\n</div>\n", + "example": 158, + "start_line": 2732, + "end_line": 2740, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<table>\n\n<tr>\n\n<td>\nHi\n</td>\n\n</tr>\n\n</table>\n", + "html": "<table>\n<tr>\n<td>\nHi\n</td>\n</tr>\n</table>\n", + "example": 159, + "start_line": 2754, + "end_line": 2774, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "<table>\n\n <tr>\n\n <td>\n Hi\n </td>\n\n </tr>\n\n</table>\n", + "formattedMarkdown": "<table>\n\n<tr>\n\n <td>\n Hi\n </td>\n\n</tr>\n\n</table>", + "html": "<table>\n <tr>\n<pre><code><td>\n Hi\n</td>\n</code></pre>\n </tr>\n</table>\n", + "example": 160, + "start_line": 2781, + "end_line": 2802, + "section": "HTML blocks", + "extensions": [] + }, + { + "markdown": "[foo]: /url \"title\"\n\n[foo]\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 161, + "start_line": 2829, + "end_line": 2835, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": " [foo]: \n /url \n 'the title' \n\n[foo]\n", + "formattedMarkdown": "[foo]: /url 'the title'\n\n[foo]", + "html": "<p><a href=\"/url\" title=\"the title\">foo</a></p>\n", + "example": 162, + "start_line": 2838, + "end_line": 2846, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[Foo*bar\\]]:my_(url) 'title (with parens)'\n\n[Foo*bar\\]]\n", + "formattedMarkdown": "[Foo*bar\\]]: my_(url) 'title (with parens)'\n\n[Foo*bar\\]]", + "html": "<p><a href=\"my_(url)\" title=\"title (with parens)\">Foo*bar]</a></p>\n", + "example": 163, + "start_line": 2849, + "end_line": 2855, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[Foo bar]:\n<my url>\n'title'\n\n[Foo bar]\n", + "formattedMarkdown": "[Foo bar]: <my url> 'title'\n\n[Foo bar]", + "html": "<p><a href=\"my%20url\" title=\"title\">Foo bar</a></p>\n", + "example": 164, + "start_line": 2858, + "end_line": 2866, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]\n", + "formattedMarkdown": "[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]", + "html": "<p><a href=\"/url\" title=\"\ntitle\nline1\nline2\n\">foo</a></p>\n", + "example": 165, + "start_line": 2871, + "end_line": 2885, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url 'title\n\nwith blank line'\n\n[foo]\n", + "html": "<p>[foo]: /url 'title</p>\n<p>with blank line'</p>\n<p>[foo]</p>\n", + "example": 166, + "start_line": 2890, + "end_line": 2900, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]:\n/url\n\n[foo]\n", + "formattedMarkdown": "[foo]: /url\n\n[foo]", + "html": "<p><a href=\"/url\">foo</a></p>\n", + "example": 167, + "start_line": 2905, + "end_line": 2912, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]:\n\n[foo]\n", + "html": "<p>[foo]:</p>\n<p>[foo]</p>\n", + "example": 168, + "start_line": 2917, + "end_line": 2924, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: <>\n\n[foo]\n", + "formattedMarkdown": "[foo]: <>\n\n[foo]", + "html": "<p><a href=\"\">foo</a></p>\n", + "example": 169, + "start_line": 2929, + "end_line": 2935, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: <bar>(baz)\n\n[foo]\n", + "html": "<p>[foo]: <bar>(baz)</p>\n<p>[foo]</p>\n", + "example": 170, + "start_line": 2940, + "end_line": 2947, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]\n", + "formattedMarkdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]", + "html": "<p><a href=\"/url%5Cbar*baz\" title=\"foo"bar\\baz\">foo</a></p>\n", + "example": 171, + "start_line": 2953, + "end_line": 2959, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]\n\n[foo]: url\n", + "html": "<p><a href=\"url\">foo</a></p>\n", + "example": 172, + "start_line": 2964, + "end_line": 2970, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]\n\n[foo]: first\n[foo]: second\n", + "formattedMarkdown": "[foo]\n\n[foo]: first", + "html": "<p><a href=\"first\">foo</a></p>\n", + "example": 173, + "start_line": 2976, + "end_line": 2983, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[FOO]: /url\n\n[Foo]\n", + "formattedMarkdown": "[FOO]: /url\n\n[Foo]", + "html": "<p><a href=\"/url\">Foo</a></p>\n", + "example": 174, + "start_line": 2989, + "end_line": 2995, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[\u0391\u0393\u03a9]: /\u03c6\u03bf\u03c5\n\n[\u03b1\u03b3\u03c9]\n", + "formattedMarkdown": "[ΑΓΩ]: /φου\n\n[αγω]", + "html": "<p><a href=\"/%CF%86%CE%BF%CF%85\">\u03b1\u03b3\u03c9</a></p>\n", + "example": 175, + "start_line": 2998, + "end_line": 3004, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url\n", + "html": "", + "example": 176, + "start_line": 3010, + "end_line": 3013, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[\nfoo\n]: /url\nbar\n", + "formattedMarkdown": "[ foo ]: /url\nbar", + "html": "<p>bar</p>\n", + "example": 177, + "start_line": 3018, + "end_line": 3025, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url \"title\" ok\n", + "html": "<p>[foo]: /url "title" ok</p>\n", + "example": 178, + "start_line": 3031, + "end_line": 3035, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url\n\"title\" ok\n", + "formattedMarkdown": "[foo]: /url \"title\"\"title\" ok", + "html": "<p>"title" ok</p>\n", + "example": 179, + "start_line": 3040, + "end_line": 3045, + "section": "Link reference definitions", + "skip": true, + "comment": "FIXME(ytmim) the \"title\" is duplcated here", + "extensions": [] + }, + { + "markdown": " [foo]: /url \"title\"\n\n[foo]\n", + "html": "<pre><code>[foo]: /url "title"\n</code></pre>\n<p>[foo]</p>\n", + "example": 180, + "start_line": 3051, + "end_line": 3059, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "```\n[foo]: /url\n```\n\n[foo]\n", + "html": "<pre><code>[foo]: /url\n</code></pre>\n<p>[foo]</p>\n", + "example": 181, + "start_line": 3065, + "end_line": 3075, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "Foo\n[bar]: /baz\n\n[bar]\n", + "formattedMarkdown": "Foo\n[bar]: /baz\n\n[bar]", + "html": "<p>Foo\n[bar]: /baz</p>\n<p>[bar]</p>\n", + "example": 182, + "start_line": 3080, + "end_line": 3089, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "# [Foo]\n[foo]: /url\n> bar\n", + "html": "<h1><a href=\"/url\">Foo</a></h1>\n<blockquote>\n<p>bar</p>\n</blockquote>\n", + "example": 183, + "start_line": 3095, + "end_line": 3104, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url\nbar\n===\n[foo]\n", + "html": "<h1>bar</h1>\n<p><a href=\"/url\">foo</a></p>\n", + "example": 184, + "start_line": 3106, + "end_line": 3114, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /url\n===\n[foo]\n", + "html": "<p>===\n<a href=\"/url\">foo</a></p>\n", + "example": 185, + "start_line": 3116, + "end_line": 3123, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url\n \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]\n", + "formattedMarkdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]", + "html": "<p><a href=\"/foo-url\" title=\"foo\">foo</a>,\n<a href=\"/bar-url\" title=\"bar\">bar</a>,\n<a href=\"/baz-url\">baz</a></p>\n", + "example": 186, + "start_line": 3129, + "end_line": 3142, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "[foo]\n\n> [foo]: /url\n", + "formattedMarkdown": "[foo]\n\n>\n[foo]: /url", + "html": "<p><a href=\"/url\">foo</a></p>\n<blockquote>\n</blockquote>\n", + "example": 187, + "start_line": 3150, + "end_line": 3158, + "section": "Link reference definitions", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": "[foo]: /url\n", + "html": "", + "example": 188, + "start_line": 3167, + "end_line": 3170, + "section": "Link reference definitions", + "extensions": [] + }, + { + "markdown": "aaa\n\nbbb\n", + "html": "<p>aaa</p>\n<p>bbb</p>\n", + "example": 189, + "start_line": 3184, + "end_line": 3191, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": "aaa\nbbb\n\nccc\nddd\n", + "html": "<p>aaa\nbbb</p>\n<p>ccc\nddd</p>\n", + "example": 190, + "start_line": 3196, + "end_line": 3207, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": "aaa\n\n\nbbb\n", + "html": "<p>aaa</p>\n<p>bbb</p>\n", + "example": 191, + "start_line": 3212, + "end_line": 3220, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": " aaa\n bbb\n", + "formattedMarkdown": "aaa\nbbb", + "html": "<p>aaa\nbbb</p>\n", + "example": 192, + "start_line": 3225, + "end_line": 3231, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": "aaa\n bbb\n ccc\n", + "formattedMarkdown": "aaa\nbbb\nccc", + "html": "<p>aaa\nbbb\nccc</p>\n", + "example": 193, + "start_line": 3237, + "end_line": 3245, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": " aaa\nbbb\n", + "formattedMarkdown": "aaa\nbbb", + "html": "<p>aaa\nbbb</p>\n", + "example": 194, + "start_line": 3251, + "end_line": 3257, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": " aaa\nbbb\n", + "html": "<pre><code>aaa\n</code></pre>\n<p>bbb</p>\n", + "example": 195, + "start_line": 3260, + "end_line": 3267, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": "aaa \nbbb \n", + "html": "<p>aaa<br />\nbbb</p>\n", + "example": 196, + "start_line": 3274, + "end_line": 3280, + "section": "Paragraphs", + "extensions": [] + }, + { + "markdown": " \n\naaa\n \n\n# aaa\n\n \n", + "formattedMarkdown": "aaa\n\n\n# aaa", + "html": "<p>aaa</p>\n<h1>aaa</h1>\n", + "example": 197, + "start_line": 3291, + "end_line": 3303, + "section": "Blank lines", + "extensions": [] + }, + { + "markdown": "| foo | bar |\n| --- | --- |\n| baz | bim |\n", + "html": "<table>\n<thead>\n<tr>\n<th>foo</th>\n<th>bar</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>baz</td>\n<td>bim</td>\n</tr>\n</tbody>\n</table>\n", + "example": 198, + "start_line": 3326, + "end_line": 3345, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "| abc | defghi |\n:-: | -----------:\nbar | baz\n", + "formattedMarkdown": "| abc | defghi |\n| :-: | -----: |\n| bar | baz |", + "html": "<table>\n<thead>\n<tr>\n<th align=\"center\">abc</th>\n<th align=\"right\">defghi</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"center\">bar</td>\n<td align=\"right\">baz</td>\n</tr>\n</tbody>\n</table>\n", + "example": 199, + "start_line": 3350, + "end_line": 3369, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "| f\\|oo |\n| ------ |\n| b `\\|` az |\n| b **\\|** im |\n", + "formattedMarkdown": "| f\\|oo |\n| ----------- |\n| b `\\|` az |\n| b **\\|** im |", + "html": "<table>\n<thead>\n<tr>\n<th>f|oo</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>b <code>|</code> az</td>\n</tr>\n<tr>\n<td>b <strong>|</strong> im</td>\n</tr>\n</tbody>\n</table>\n", + "example": 200, + "start_line": 3374, + "end_line": 3395, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "| abc | def |\n| --- | --- |\n| bar | baz |\n> bar\n", + "html": "<table>\n<thead>\n<tr>\n<th>abc</th>\n<th>def</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>bar</td>\n<td>baz</td>\n</tr>\n</tbody>\n</table>\n<blockquote>\n<p>bar</p>\n</blockquote>\n", + "example": 201, + "start_line": 3400, + "end_line": 3423, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "| abc | def |\n| --- | --- |\n| bar | baz |\nbar\n\nbar\n", + "formattedMarkdown": "| abc | def |\n| --- | --- |\n| bar | baz |\n| bar | |\n\nbar", + "html": "<table>\n<thead>\n<tr>\n<th>abc</th>\n<th>def</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>bar</td>\n<td>baz</td>\n</tr>\n<tr>\n<td>bar</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>bar</p>\n", + "example": 202, + "start_line": 3425, + "end_line": 3452, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "| abc | def |\n| --- |\n| bar |\n", + "html": "<p>| abc | def |\n| --- |\n| bar |</p>\n", + "example": 203, + "start_line": 3457, + "end_line": 3465, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "| abc | def |\n| --- | --- |\n| bar |\n| bar | baz | boo |\n", + "formattedMarkdown": "| abc | def |\n| --- | --- |\n| bar | |\n| bar | baz |", + "html": "<table>\n<thead>\n<tr>\n<th>abc</th>\n<th>def</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>bar</td>\n<td></td>\n</tr>\n<tr>\n<td>bar</td>\n<td>baz</td>\n</tr>\n</tbody>\n</table>\n", + "example": 204, + "start_line": 3471, + "end_line": 3495, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "| abc | def |\n| --- | --- |\n", + "html": "<table>\n<thead>\n<tr>\n<th>abc</th>\n<th>def</th>\n</tr>\n</thead>\n</table>\n", + "example": 205, + "start_line": 3499, + "end_line": 3511, + "section": "Tables (extension)", + "extensions": [ + "table" + ] + }, + { + "markdown": "> # Foo\n> bar\n> baz\n", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 206, + "start_line": 3565, + "end_line": 3575, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "># Foo\n>bar\n> baz\n", + "formattedMarkdown": "> # Foo\n> bar\n> baz", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 207, + "start_line": 3580, + "end_line": 3590, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "formattedMarkdown": "> # Foo\n> bar\n> baz", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 208, + "start_line": 3595, + "end_line": 3605, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "<pre><code>> # Foo\n> bar\n> baz\n</code></pre>\n", + "example": 209, + "start_line": 3610, + "end_line": 3619, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> # Foo\n> bar\nbaz\n", + "formattedMarkdown": "> # Foo\n> bar\n> baz", + "html": "<blockquote>\n<h1>Foo</h1>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 210, + "start_line": 3625, + "end_line": 3635, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> bar\nbaz\n> foo\n", + "formattedMarkdown": "> bar\n> baz\n> foo", + "html": "<blockquote>\n<p>bar\nbaz\nfoo</p>\n</blockquote>\n", + "example": 211, + "start_line": 3641, + "end_line": 3651, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> foo\n---\n", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n<hr />\n", + "example": 212, + "start_line": 3665, + "end_line": 3673, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> - foo\n- bar\n", + "html": "<blockquote>\n<ul>\n<li>foo</li>\n</ul>\n</blockquote>\n<ul>\n<li>bar</li>\n</ul>\n", + "example": 213, + "start_line": 3685, + "end_line": 3697, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> foo\n bar\n", + "html": "<blockquote>\n<pre><code>foo\n</code></pre>\n</blockquote>\n<pre><code>bar\n</code></pre>\n", + "example": 214, + "start_line": 3703, + "end_line": 3713, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> ```\nfoo\n```\n", + "formattedMarkdown": "> ```\n>\n> ```\nfoo\n```\n```", + "html": "<blockquote>\n<pre><code></code></pre>\n</blockquote>\n<p>foo</p>\n<pre><code></code></pre>\n", + "example": 215, + "start_line": 3716, + "end_line": 3726, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> foo\n - bar\n", + "formattedMarkdown": "> foo\n> \\- bar", + "html": "<blockquote>\n<p>foo\n- bar</p>\n</blockquote>\n", + "example": 216, + "start_line": 3732, + "end_line": 3740, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": ">\n", + "html": "<blockquote>\n</blockquote>\n", + "example": 217, + "start_line": 3756, + "end_line": 3761, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": ">\n> \n> \n", + "formattedMarkdown": ">\n>\n>", + "html": "<blockquote>\n</blockquote>\n", + "example": 218, + "start_line": 3764, + "end_line": 3771, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": ">\n> foo\n> \n", + "formattedMarkdown": "> foo\n>", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n", + "example": 219, + "start_line": 3776, + "end_line": 3784, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> foo\n\n> bar\n", + "html": "<blockquote>\n<p>foo</p>\n</blockquote>\n<blockquote>\n<p>bar</p>\n</blockquote>\n", + "example": 220, + "start_line": 3789, + "end_line": 3800, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> foo\n> bar\n", + "html": "<blockquote>\n<p>foo\nbar</p>\n</blockquote>\n", + "example": 221, + "start_line": 3811, + "end_line": 3819, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> foo\n>\n> bar\n", + "html": "<blockquote>\n<p>foo</p>\n<p>bar</p>\n</blockquote>\n", + "example": 222, + "start_line": 3824, + "end_line": 3833, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "foo\n> bar\n", + "html": "<p>foo</p>\n<blockquote>\n<p>bar</p>\n</blockquote>\n", + "example": 223, + "start_line": 3838, + "end_line": 3846, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> aaa\n***\n> bbb\n", + "html": "<blockquote>\n<p>aaa</p>\n</blockquote>\n<hr />\n<blockquote>\n<p>bbb</p>\n</blockquote>\n", + "example": 224, + "start_line": 3852, + "end_line": 3864, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> bar\nbaz\n", + "formattedMarkdown": "> bar\n> baz", + "html": "<blockquote>\n<p>bar\nbaz</p>\n</blockquote>\n", + "example": 225, + "start_line": 3870, + "end_line": 3878, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> bar\n\nbaz\n", + "html": "<blockquote>\n<p>bar</p>\n</blockquote>\n<p>baz</p>\n", + "example": 226, + "start_line": 3881, + "end_line": 3890, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> bar\n>\nbaz\n", + "html": "<blockquote>\n<p>bar</p>\n</blockquote>\n<p>baz</p>\n", + "example": 227, + "start_line": 3893, + "end_line": 3902, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> > > foo\nbar\n", + "formattedMarkdown": "> > > foo\n> > > bar", + "html": "<blockquote>\n<blockquote>\n<blockquote>\n<p>foo\nbar</p>\n</blockquote>\n</blockquote>\n</blockquote>\n", + "example": 228, + "start_line": 3909, + "end_line": 3921, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": ">>> foo\n> bar\n>>baz\n", + "formattedMarkdown": "> > > foo\n> > > bar\n> > > baz", + "html": "<blockquote>\n<blockquote>\n<blockquote>\n<p>foo\nbar\nbaz</p>\n</blockquote>\n</blockquote>\n</blockquote>\n", + "example": 229, + "start_line": 3924, + "end_line": 3938, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "> code\n\n> not code\n", + "formattedMarkdown": "> code\n\n> not code", + "html": "<blockquote>\n<pre><code>code\n</code></pre>\n</blockquote>\n<blockquote>\n<p>not code</p>\n</blockquote>\n", + "example": 230, + "start_line": 3946, + "end_line": 3958, + "section": "Block quotes", + "extensions": [] + }, + { + "markdown": "A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n", + "html": "<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n", + "example": 231, + "start_line": 4000, + "end_line": 4015, + "section": "List items", + "extensions": [] + }, + { + "markdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 232, + "start_line": 4022, + "end_line": 4041, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- one\n\n two\n", + "formattedMarkdown": "- one\n\ntwo", + "html": "<ul>\n<li>one</li>\n</ul>\n<p>two</p>\n", + "example": 233, + "start_line": 4055, + "end_line": 4064, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- one\n\n two\n", + "html": "<ul>\n<li>\n<p>one</p>\n<p>two</p>\n</li>\n</ul>\n", + "example": 234, + "start_line": 4067, + "end_line": 4078, + "section": "List items", + "extensions": [] + }, + { + "markdown": " - one\n\n two\n", + "formattedMarkdown": "- one\n<!-- Dont absorb code block into list -->\n<!-- Consider a feenced code block instead -->\n\n two", + "html": "<ul>\n<li>one</li>\n</ul>\n<pre><code> two\n</code></pre>\n", + "example": 235, + "start_line": 4081, + "end_line": 4091, + "section": "List items", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": " - one\n\n two\n", + "formattedMarkdown": "- one\n\n two", + "html": "<ul>\n<li>\n<p>one</p>\n<p>two</p>\n</li>\n</ul>\n", + "example": 236, + "start_line": 4094, + "end_line": 4105, + "section": "List items", + "extensions": [] + }, + { + "markdown": " > > 1. one\n>>\n>> two\n", + "formattedMarkdown": "> > 1. one\n> >\n> > two", + "html": "<blockquote>\n<blockquote>\n<ol>\n<li>\n<p>one</p>\n<p>two</p>\n</li>\n</ol>\n</blockquote>\n</blockquote>\n", + "example": 237, + "start_line": 4116, + "end_line": 4131, + "section": "List items", + "extensions": [] + }, + { + "markdown": ">>- one\n>>\n > > two\n", + "formattedMarkdown": "> > - one\n> >\n> > two", + "html": "<blockquote>\n<blockquote>\n<ul>\n<li>one</li>\n</ul>\n<p>two</p>\n</blockquote>\n</blockquote>\n", + "example": 238, + "start_line": 4143, + "end_line": 4156, + "section": "List items", + "extensions": [] + }, + { + "markdown": "-one\n\n2.two\n", + "html": "<p>-one</p>\n<p>2.two</p>\n", + "example": 239, + "start_line": 4162, + "end_line": 4169, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n\n\n bar\n", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 240, + "start_line": 4175, + "end_line": 4187, + "section": "List items", + "extensions": [] + }, + { + "markdown": "1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam\n", + "formattedMarkdown": "1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam", + "html": "<ol>\n<li>\n<p>foo</p>\n<pre><code>bar\n</code></pre>\n<p>baz</p>\n<blockquote>\n<p>bam</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 241, + "start_line": 4192, + "end_line": 4214, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- Foo\n\n bar\n\n\n baz\n", + "html": "<ul>\n<li>\n<p>Foo</p>\n<pre><code>bar\n\n\nbaz\n</code></pre>\n</li>\n</ul>\n", + "example": 242, + "start_line": 4220, + "end_line": 4238, + "section": "List items", + "extensions": [] + }, + { + "markdown": "123456789. ok\n", + "html": "<ol start=\"123456789\">\n<li>ok</li>\n</ol>\n", + "example": 243, + "start_line": 4242, + "end_line": 4248, + "section": "List items", + "extensions": [] + }, + { + "markdown": "1234567890. not ok\n", + "html": "<p>1234567890. not ok</p>\n", + "example": 244, + "start_line": 4251, + "end_line": 4255, + "section": "List items", + "extensions": [] + }, + { + "markdown": "0. ok\n", + "html": "<ol start=\"0\">\n<li>ok</li>\n</ol>\n", + "example": 245, + "start_line": 4260, + "end_line": 4266, + "section": "List items", + "extensions": [] + }, + { + "markdown": "003. ok\n", + "html": "<ol start=\"3\">\n<li>ok</li>\n</ol>\n", + "example": 246, + "start_line": 4269, + "end_line": 4275, + "section": "List items", + "extensions": [] + }, + { + "markdown": "-1. not ok\n", + "html": "<p>-1. not ok</p>\n", + "example": 247, + "start_line": 4280, + "end_line": 4284, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n\n bar\n", + "html": "<ul>\n<li>\n<p>foo</p>\n<pre><code>bar\n</code></pre>\n</li>\n</ul>\n", + "example": 248, + "start_line": 4303, + "end_line": 4315, + "section": "List items", + "extensions": [] + }, + { + "markdown": " 10. foo\n\n bar\n", + "formattedMarkdown": "10. foo\n\n bar", + "html": "<ol start=\"10\">\n<li>\n<p>foo</p>\n<pre><code>bar\n</code></pre>\n</li>\n</ol>\n", + "example": 249, + "start_line": 4320, + "end_line": 4332, + "section": "List items", + "extensions": [] + }, + { + "markdown": " indented code\n\nparagraph\n\n more code\n", + "html": "<pre><code>indented code\n</code></pre>\n<p>paragraph</p>\n<pre><code>more code\n</code></pre>\n", + "example": 250, + "start_line": 4339, + "end_line": 4351, + "section": "List items", + "extensions": [] + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "<ol>\n<li>\n<pre><code>indented code\n</code></pre>\n<p>paragraph</p>\n<pre><code>more code\n</code></pre>\n</li>\n</ol>\n", + "example": 251, + "start_line": 4354, + "end_line": 4370, + "section": "List items", + "extensions": [] + }, + { + "markdown": "1. indented code\n\n paragraph\n\n more code\n", + "html": "<ol>\n<li>\n<pre><code> indented code\n</code></pre>\n<p>paragraph</p>\n<pre><code>more code\n</code></pre>\n</li>\n</ol>\n", + "example": 252, + "start_line": 4376, + "end_line": 4392, + "section": "List items", + "extensions": [] + }, + { + "markdown": " foo\n\nbar\n", + "formattedMarkdown": "foo\n\nbar", + "html": "<p>foo</p>\n<p>bar</p>\n", + "example": 253, + "start_line": 4403, + "end_line": 4410, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n\n bar\n", + "formattedMarkdown": "- foo\n\nbar", + "html": "<ul>\n<li>foo</li>\n</ul>\n<p>bar</p>\n", + "example": 254, + "start_line": 4413, + "end_line": 4422, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n\n bar\n", + "formattedMarkdown": "- foo\n\n bar", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>bar</p>\n</li>\n</ul>\n", + "example": 255, + "start_line": 4430, + "end_line": 4441, + "section": "List items", + "extensions": [] + }, + { + "markdown": "-\n foo\n-\n ```\n bar\n ```\n-\n baz\n", + "formattedMarkdown": "- foo\n- ```\n bar\n ```\n- baz", + "html": "<ul>\n<li>foo</li>\n<li>\n<pre><code>bar\n</code></pre>\n</li>\n<li>\n<pre><code>baz\n</code></pre>\n</li>\n</ul>\n", + "example": 256, + "start_line": 4458, + "end_line": 4479, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- \n foo\n", + "formattedMarkdown": "- foo", + "html": "<ul>\n<li>foo</li>\n</ul>\n", + "example": 257, + "start_line": 4484, + "end_line": 4491, + "section": "List items", + "extensions": [] + }, + { + "markdown": "-\n\n foo\n", + "formattedMarkdown": "-\n\nfoo", + "html": "<ul>\n<li></li>\n</ul>\n<p>foo</p>\n", + "example": 258, + "start_line": 4498, + "end_line": 4507, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n-\n- bar\n", + "html": "<ul>\n<li>foo</li>\n<li></li>\n<li>bar</li>\n</ul>\n", + "example": 259, + "start_line": 4512, + "end_line": 4522, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n- \n- bar\n", + "formattedMarkdown": "- foo\n-\n- bar", + "html": "<ul>\n<li>foo</li>\n<li></li>\n<li>bar</li>\n</ul>\n", + "example": 260, + "start_line": 4527, + "end_line": 4537, + "section": "List items", + "extensions": [] + }, + { + "markdown": "1. foo\n2.\n3. bar\n", + "html": "<ol>\n<li>foo</li>\n<li></li>\n<li>bar</li>\n</ol>\n", + "example": 261, + "start_line": 4542, + "end_line": 4552, + "section": "List items", + "extensions": [] + }, + { + "markdown": "*\n", + "html": "<ul>\n<li></li>\n</ul>\n", + "example": 262, + "start_line": 4557, + "end_line": 4563, + "section": "List items", + "extensions": [] + }, + { + "markdown": "foo\n*\n\nfoo\n1.\n", + "html": "<p>foo\n*</p>\n<p>foo\n1.</p>\n", + "example": 263, + "start_line": 4567, + "end_line": 4578, + "section": "List items", + "extensions": [] + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 264, + "start_line": 4589, + "end_line": 4608, + "section": "List items", + "extensions": [] + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 265, + "start_line": 4613, + "end_line": 4632, + "section": "List items", + "extensions": [] + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 266, + "start_line": 4637, + "end_line": 4656, + "section": "List items", + "extensions": [] + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "<pre><code>1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n</code></pre>\n", + "example": 267, + "start_line": 4661, + "end_line": 4676, + "section": "List items", + "extensions": [] + }, + { + "markdown": " 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.", + "html": "<ol>\n<li>\n<p>A paragraph\nwith two lines.</p>\n<pre><code>indented code\n</code></pre>\n<blockquote>\n<p>A block quote.</p>\n</blockquote>\n</li>\n</ol>\n", + "example": 268, + "start_line": 4691, + "end_line": 4710, + "section": "List items", + "extensions": [] + }, + { + "markdown": " 1. A paragraph\n with two lines.\n", + "formattedMarkdown": "1. A paragraph\n with two lines.", + "html": "<ol>\n<li>A paragraph\nwith two lines.</li>\n</ol>\n", + "example": 269, + "start_line": 4715, + "end_line": 4723, + "section": "List items", + "extensions": [] + }, + { + "markdown": "> 1. > Blockquote\ncontinued here.\n", + "formattedMarkdown": "> 1. > Blockquote\n> > continued here.", + "html": "<blockquote>\n<ol>\n<li>\n<blockquote>\n<p>Blockquote\ncontinued here.</p>\n</blockquote>\n</li>\n</ol>\n</blockquote>\n", + "example": 270, + "start_line": 4728, + "end_line": 4742, + "section": "List items", + "extensions": [] + }, + { + "markdown": "> 1. > Blockquote\n> continued here.\n", + "formattedMarkdown": "> 1. > Blockquote\n> > continued here.", + "html": "<blockquote>\n<ol>\n<li>\n<blockquote>\n<p>Blockquote\ncontinued here.</p>\n</blockquote>\n</li>\n</ol>\n</blockquote>\n", + "example": 271, + "start_line": 4745, + "end_line": 4759, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "html": "<ul>\n<li>foo\n<ul>\n<li>bar\n<ul>\n<li>baz\n<ul>\n<li>boo</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n", + "example": 272, + "start_line": 4773, + "end_line": 4794, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "formattedMarkdown": "- foo\n- bar\n- baz\n- boo", + "html": "<ul>\n<li>foo</li>\n<li>bar</li>\n<li>baz</li>\n<li>boo</li>\n</ul>\n", + "example": 273, + "start_line": 4799, + "end_line": 4811, + "section": "List items", + "extensions": [] + }, + { + "markdown": "10) foo\n - bar\n", + "html": "<ol start=\"10\">\n<li>foo\n<ul>\n<li>bar</li>\n</ul>\n</li>\n</ol>\n", + "example": 274, + "start_line": 4816, + "end_line": 4827, + "section": "List items", + "extensions": [] + }, + { + "markdown": "10) foo\n - bar\n", + "formattedMarkdown": "10) foo\n- bar", + "html": "<ol start=\"10\">\n<li>foo</li>\n</ol>\n<ul>\n<li>bar</li>\n</ul>\n", + "example": 275, + "start_line": 4832, + "end_line": 4842, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- - foo\n", + "html": "<ul>\n<li>\n<ul>\n<li>foo</li>\n</ul>\n</li>\n</ul>\n", + "example": 276, + "start_line": 4847, + "end_line": 4857, + "section": "List items", + "extensions": [] + }, + { + "markdown": "1. - 2. foo\n", + "html": "<ol>\n<li>\n<ul>\n<li>\n<ol start=\"2\">\n<li>foo</li>\n</ol>\n</li>\n</ul>\n</li>\n</ol>\n", + "example": 277, + "start_line": 4860, + "end_line": 4874, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- # Foo\n- Bar\n ---\n baz\n", + "html": "<ul>\n<li>\n<h1>Foo</h1>\n</li>\n<li>\n<h2>Bar</h2>\nbaz</li>\n</ul>\n", + "example": 278, + "start_line": 4879, + "end_line": 4893, + "section": "List items", + "extensions": [] + }, + { + "markdown": "- foo\n- bar\n+ baz\n", + "html": "<ul>\n<li>foo</li>\n<li>bar</li>\n</ul>\n<ul>\n<li>baz</li>\n</ul>\n", + "example": 281, + "start_line": 5172, + "end_line": 5184, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "1. foo\n2. bar\n3) baz\n", + "html": "<ol>\n<li>foo</li>\n<li>bar</li>\n</ol>\n<ol start=\"3\">\n<li>baz</li>\n</ol>\n", + "example": 282, + "start_line": 5187, + "end_line": 5199, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "Foo\n- bar\n- baz\n", + "html": "<p>Foo</p>\n<ul>\n<li>bar</li>\n<li>baz</li>\n</ul>\n", + "example": 283, + "start_line": 5206, + "end_line": 5216, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "The number of windows in my house is\n14. The number of doors is 6.\n", + "html": "<p>The number of windows in my house is\n14. The number of doors is 6.</p>\n", + "example": 284, + "start_line": 5283, + "end_line": 5289, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "The number of windows in my house is\n1. The number of doors is 6.\n", + "formattedMarkdown": "The number of windows in my house is\n1. The number of doors is 6.", + "html": "<p>The number of windows in my house is</p>\n<ol>\n<li>The number of doors is 6.</li>\n</ol>\n", + "example": 285, + "start_line": 5293, + "end_line": 5301, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- foo\n\n- bar\n\n\n- baz\n", + "html": "<ul>\n<li>\n<p>foo</p>\n</li>\n<li>\n<p>bar</p>\n</li>\n<li>\n<p>baz</p>\n</li>\n</ul>\n", + "example": 286, + "start_line": 5307, + "end_line": 5326, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- foo\n - bar\n - baz\n\n\n bim\n", + "html": "<ul>\n<li>foo\n<ul>\n<li>bar\n<ul>\n<li>\n<p>baz</p>\n<p>bim</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n", + "example": 287, + "start_line": 5328, + "end_line": 5350, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- foo\n- bar\n\n<!-- -->\n\n- baz\n- bim\n", + "html": "<ul>\n<li>foo</li>\n<li>bar</li>\n</ul>\n<!-- -->\n<ul>\n<li>baz</li>\n<li>bim</li>\n</ul>\n", + "example": 288, + "start_line": 5358, + "end_line": 5376, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- foo\n\n notcode\n\n- foo\n\n<!-- -->\n\n code\n", + "formattedMarkdown": "- foo\n\n notcode\n\n- foo\n\n<!-- -->\n\n code", + "html": "<ul>\n<li>\n<p>foo</p>\n<p>notcode</p>\n</li>\n<li>\n<p>foo</p>\n</li>\n</ul>\n<!-- -->\n<pre><code>code\n</code></pre>\n", + "example": 289, + "start_line": 5379, + "end_line": 5402, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n - f\n- g\n", + "formattedMarkdown": "- a\n- b\n- c\n- d\n- e\n- f\n- g", + "html": "<ul>\n<li>a</li>\n<li>b</li>\n<li>c</li>\n<li>d</li>\n<li>e</li>\n<li>f</li>\n<li>g</li>\n</ul>\n", + "example": 290, + "start_line": 5410, + "end_line": 5428, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "formattedMarkdown": "1. a\n\n2. b\n\n3. c", + "html": "<ol>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n<li>\n<p>c</p>\n</li>\n</ol>\n", + "example": 291, + "start_line": 5431, + "end_line": 5449, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n - b\n - c\n - d\n - e\n", + "formattedMarkdown": "- a\n- b\n- c\n- d\n \\- e", + "html": "<ul>\n<li>a</li>\n<li>b</li>\n<li>c</li>\n<li>d\n- e</li>\n</ul>\n", + "example": 292, + "start_line": 5455, + "end_line": 5469, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "1. a\n\n 2. b\n\n 3. c\n", + "formattedMarkdown": "1. a\n\n2. b\n<!-- Dont absorb code block into list -->\n<!-- Consider a feenced code block instead -->\n\n 3. c", + "html": "<ol>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n</ol>\n<pre><code>3. c\n</code></pre>\n", + "example": 293, + "start_line": 5475, + "end_line": 5492, + "section": "Lists", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": "- a\n- b\n\n- c\n", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n<li>\n<p>c</p>\n</li>\n</ul>\n", + "example": 294, + "start_line": 5498, + "end_line": 5515, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "* a\n*\n\n* c\n", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li></li>\n<li>\n<p>c</p>\n</li>\n</ul>\n", + "example": 295, + "start_line": 5520, + "end_line": 5535, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n- b\n\n c\n- d\n", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n<p>c</p>\n</li>\n<li>\n<p>d</p>\n</li>\n</ul>\n", + "example": 296, + "start_line": 5542, + "end_line": 5561, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n- b\n\n [ref]: /url\n- d\n", + "formattedMarkdown": "- a\n- b\n\n[ref]: /url\n- d", + "html": "<ul>\n<li>\n<p>a</p>\n</li>\n<li>\n<p>b</p>\n</li>\n<li>\n<p>d</p>\n</li>\n</ul>\n", + "example": 297, + "start_line": 5564, + "end_line": 5582, + "section": "Lists", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": "- a\n- ```\n b\n\n\n ```\n- c\n", + "formattedMarkdown": "- a\n- ```\n b\n ```\n- c", + "html": "<ul>\n<li>a</li>\n<li>\n<pre><code>b\n\n\n</code></pre>\n</li>\n<li>c</li>\n</ul>\n", + "example": 298, + "start_line": 5587, + "end_line": 5606, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n - b\n\n c\n- d\n", + "html": "<ul>\n<li>a\n<ul>\n<li>\n<p>b</p>\n<p>c</p>\n</li>\n</ul>\n</li>\n<li>d</li>\n</ul>\n", + "example": 299, + "start_line": 5613, + "end_line": 5631, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "* a\n > b\n >\n* c\n", + "html": "<ul>\n<li>a\n<blockquote>\n<p>b</p>\n</blockquote>\n</li>\n<li>c</li>\n</ul>\n", + "example": 300, + "start_line": 5637, + "end_line": 5651, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n > b\n ```\n c\n ```\n- d\n", + "html": "<ul>\n<li>a\n<blockquote>\n<p>b</p>\n</blockquote>\n<pre><code>c\n</code></pre>\n</li>\n<li>d</li>\n</ul>\n", + "example": 301, + "start_line": 5657, + "end_line": 5675, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n", + "html": "<ul>\n<li>a</li>\n</ul>\n", + "example": 302, + "start_line": 5680, + "end_line": 5686, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n - b\n", + "html": "<ul>\n<li>a\n<ul>\n<li>b</li>\n</ul>\n</li>\n</ul>\n", + "example": 303, + "start_line": 5689, + "end_line": 5700, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "1. ```\n foo\n ```\n\n bar\n", + "html": "<ol>\n<li>\n<pre><code>foo\n</code></pre>\n<p>bar</p>\n</li>\n</ol>\n", + "example": 304, + "start_line": 5706, + "end_line": 5720, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "* foo\n * bar\n\n baz\n", + "html": "<ul>\n<li>\n<p>foo</p>\n<ul>\n<li>bar</li>\n</ul>\n<p>baz</p>\n</li>\n</ul>\n", + "example": 305, + "start_line": 5725, + "end_line": 5740, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "- a\n - b\n - c\n\n- d\n - e\n - f\n", + "html": "<ul>\n<li>\n<p>a</p>\n<ul>\n<li>b</li>\n<li>c</li>\n</ul>\n</li>\n<li>\n<p>d</p>\n<ul>\n<li>e</li>\n<li>f</li>\n</ul>\n</li>\n</ul>\n", + "example": 306, + "start_line": 5743, + "end_line": 5768, + "section": "Lists", + "extensions": [] + }, + { + "markdown": "`hi`lo`\n", + "html": "<p><code>hi</code>lo`</p>\n", + "example": 307, + "start_line": 5777, + "end_line": 5781, + "section": "Inlines", + "extensions": [] + }, + { + "markdown": "\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~\n", + "html": "<p>!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~</p>\n", + "example": 308, + "start_line": 5791, + "end_line": 5795, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "\\\t\\A\\a\\ \\3\\\u03c6\\\u00ab\n", + "html": "<p>\\\t\\A\\a\\ \\3\\\u03c6\\\u00ab</p>\n", + "example": 309, + "start_line": 5801, + "end_line": 5805, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "\\*not emphasized*\n\\<br/> not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n\\ö not a character entity\n", + "html": "<p>*not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"\n&ouml; not a character entity</p>\n", + "example": 310, + "start_line": 5811, + "end_line": 5831, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "\\\\*emphasis*\n", + "html": "<p>\\<em>emphasis</em></p>\n", + "example": 311, + "start_line": 5836, + "end_line": 5840, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "foo\\\nbar\n", + "html": "<p>foo<br />\nbar</p>\n", + "example": 312, + "start_line": 5845, + "end_line": 5851, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "`` \\[\\` ``\n", + "html": "<p><code>\\[\\`</code></p>\n", + "example": 313, + "start_line": 5857, + "end_line": 5861, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": " \\[\\]\n", + "html": "<pre><code>\\[\\]\n</code></pre>\n", + "example": 314, + "start_line": 5864, + "end_line": 5869, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "~~~\n\\[\\]\n~~~\n", + "html": "<pre><code>\\[\\]\n</code></pre>\n", + "example": 315, + "start_line": 5872, + "end_line": 5879, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "<http://example.com?find=\\*>\n", + "html": "<p><a href=\"http://example.com?find=%5C*\">http://example.com?find=\\*</a></p>\n", + "example": 316, + "start_line": 5882, + "end_line": 5886, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "<a href=\"/bar\\/)\">\n", + "html": "<a href=\"/bar\\/)\">\n", + "example": 317, + "start_line": 5889, + "end_line": 5893, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "[foo](/bar\\* \"ti\\*tle\")\n", + "html": "<p><a href=\"/bar*\" title=\"ti*tle\">foo</a></p>\n", + "example": 318, + "start_line": 5899, + "end_line": 5903, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"\n", + "html": "<p><a href=\"/bar*\" title=\"ti*tle\">foo</a></p>\n", + "example": 319, + "start_line": 5906, + "end_line": 5912, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "``` foo\\+bar\nfoo\n```\n", + "html": "<pre><code class=\"language-foo+bar\">foo\n</code></pre>\n", + "example": 320, + "start_line": 5915, + "end_line": 5922, + "section": "Backslash escapes", + "extensions": [] + }, + { + "markdown": "  & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸\n", + "html": "<p>\u00a0 & \u00a9 \u00c6 \u010e\n\u00be \u210b \u2146\n\u2232 \u2267\u0338</p>\n", + "example": 321, + "start_line": 5952, + "end_line": 5960, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "# Ӓ Ϡ �\n", + "html": "<p># \u04d2 \u03e0 \ufffd</p>\n", + "example": 322, + "start_line": 5971, + "end_line": 5975, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "" ആ ಫ\n", + "html": "<p>" \u0d06 \u0cab</p>\n", + "example": 323, + "start_line": 5984, + "end_line": 5988, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "  &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?;\n", + "html": "<p>&nbsp &x; &#; &#x;\n&#987654321;\n&#abcdef0;\n&ThisIsNotDefined; &hi?;</p>\n", + "example": 324, + "start_line": 5993, + "end_line": 6003, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "©\n", + "html": "<p>&copy</p>\n", + "example": 325, + "start_line": 6010, + "end_line": 6014, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "&MadeUpEntity;\n", + "html": "<p>&MadeUpEntity;</p>\n", + "example": 326, + "start_line": 6020, + "end_line": 6024, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "<a href=\"öö.html\">\n", + "html": "<a href=\"öö.html\">\n", + "example": 327, + "start_line": 6031, + "end_line": 6035, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "[foo](/föö \"föö\")\n", + "html": "<p><a href=\"/f%C3%B6%C3%B6\" title=\"f\u00f6\u00f6\">foo</a></p>\n", + "example": 328, + "start_line": 6038, + "end_line": 6042, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "[foo]\n\n[foo]: /föö \"föö\"\n", + "html": "<p><a href=\"/f%C3%B6%C3%B6\" title=\"f\u00f6\u00f6\">foo</a></p>\n", + "example": 329, + "start_line": 6045, + "end_line": 6051, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "``` föö\nfoo\n```\n", + "html": "<pre><code class=\"language-f\u00f6\u00f6\">foo\n</code></pre>\n", + "example": 330, + "start_line": 6054, + "end_line": 6061, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "`föö`\n", + "html": "<p><code>f&ouml;&ouml;</code></p>\n", + "example": 331, + "start_line": 6067, + "end_line": 6071, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": " föfö\n", + "html": "<pre><code>f&ouml;f&ouml;\n</code></pre>\n", + "example": 332, + "start_line": 6074, + "end_line": 6079, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "*foo*\n*foo*\n", + "html": "<p>*foo*\n<em>foo</em></p>\n", + "example": 333, + "start_line": 6086, + "end_line": 6092, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "* foo\n\n* foo\n", + "html": "<p>* foo</p>\n<ul>\n<li>foo</li>\n</ul>\n", + "example": 334, + "start_line": 6094, + "end_line": 6103, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "foo bar\n", + "html": "<p>foo\n\nbar</p>\n", + "example": 335, + "start_line": 6105, + "end_line": 6111, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": " foo\n", + "html": "<p>\tfoo</p>\n", + "example": 336, + "start_line": 6113, + "end_line": 6117, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "[a](url "tit")\n", + "html": "<p>[a](url "tit")</p>\n", + "example": 337, + "start_line": 6120, + "end_line": 6124, + "section": "Entity and numeric character references", + "extensions": [] + }, + { + "markdown": "`foo`\n", + "html": "<p><code>foo</code></p>\n", + "example": 338, + "start_line": 6148, + "end_line": 6152, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`` foo ` bar ``\n", + "html": "<p><code>foo ` bar</code></p>\n", + "example": 339, + "start_line": 6159, + "end_line": 6163, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "` `` `\n", + "html": "<p><code>``</code></p>\n", + "example": 340, + "start_line": 6169, + "end_line": 6173, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "` `` `\n", + "html": "<p><code> `` </code></p>\n", + "example": 341, + "start_line": 6177, + "end_line": 6181, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "` a`\n", + "html": "<p><code> a</code></p>\n", + "example": 342, + "start_line": 6186, + "end_line": 6190, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`\u00a0b\u00a0`\n", + "html": "<p><code>\u00a0b\u00a0</code></p>\n", + "example": 343, + "start_line": 6195, + "end_line": 6199, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`\u00a0`\n` `\n", + "html": "<p><code>\u00a0</code>\n<code> </code></p>\n", + "example": 344, + "start_line": 6203, + "end_line": 6209, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "``\nfoo\nbar \nbaz\n``\n", + "html": "<p><code>foo bar baz</code></p>\n", + "example": 345, + "start_line": 6214, + "end_line": 6222, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "``\nfoo \n``\n", + "html": "<p><code>foo </code></p>\n", + "example": 346, + "start_line": 6224, + "end_line": 6230, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`foo bar \nbaz`\n", + "html": "<p><code>foo bar baz</code></p>\n", + "example": 347, + "start_line": 6235, + "end_line": 6240, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`foo\\`bar`\n", + "html": "<p><code>foo\\</code>bar`</p>\n", + "example": 348, + "start_line": 6252, + "end_line": 6256, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "``foo`bar``\n", + "html": "<p><code>foo`bar</code></p>\n", + "example": 349, + "start_line": 6263, + "end_line": 6267, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "` foo `` bar `\n", + "html": "<p><code>foo `` bar</code></p>\n", + "example": 350, + "start_line": 6269, + "end_line": 6273, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "*foo`*`\n", + "html": "<p>*foo<code>*</code></p>\n", + "example": 351, + "start_line": 6281, + "end_line": 6285, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "[not a `link](/foo`)\n", + "html": "<p>[not a <code>link](/foo</code>)</p>\n", + "example": 352, + "start_line": 6290, + "end_line": 6294, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`<a href=\"`\">`\n", + "html": "<p><code><a href="</code>">`</p>\n", + "example": 353, + "start_line": 6300, + "end_line": 6304, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "<a href=\"`\">`\n", + "html": "<p><a href=\"`\">`</p>\n", + "example": 354, + "start_line": 6309, + "end_line": 6313, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`<http://foo.bar.`baz>`\n", + "html": "<p><code><http://foo.bar.</code>baz>`</p>\n", + "example": 355, + "start_line": 6318, + "end_line": 6322, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "<http://foo.bar.`baz>`\n", + "html": "<p><a href=\"http://foo.bar.%60baz\">http://foo.bar.`baz</a>`</p>\n", + "example": 356, + "start_line": 6327, + "end_line": 6331, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "```foo``\n", + "html": "<p>```foo``</p>\n", + "example": 357, + "start_line": 6337, + "end_line": 6341, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`foo\n", + "html": "<p>`foo</p>\n", + "example": 358, + "start_line": 6344, + "end_line": 6348, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "`foo``bar``\n", + "html": "<p>`foo<code>bar</code></p>\n", + "example": 359, + "start_line": 6353, + "end_line": 6357, + "section": "Code spans", + "extensions": [] + }, + { + "markdown": "*foo bar*\n", + "html": "<p><em>foo bar</em></p>\n", + "example": 360, + "start_line": 6570, + "end_line": 6574, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "a * foo bar*\n", + "html": "<p>a * foo bar*</p>\n", + "example": 361, + "start_line": 6580, + "end_line": 6584, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "a*\"foo\"*\n", + "html": "<p>a*"foo"*</p>\n", + "example": 362, + "start_line": 6591, + "end_line": 6595, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*\u00a0a\u00a0*\n", + "html": "<p>*\u00a0a\u00a0*</p>\n", + "example": 363, + "start_line": 6600, + "end_line": 6604, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo*bar*\n", + "html": "<p>foo<em>bar</em></p>\n", + "example": 364, + "start_line": 6609, + "end_line": 6613, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "5*6*78\n", + "html": "<p>5<em>6</em>78</p>\n", + "example": 365, + "start_line": 6616, + "end_line": 6620, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo bar_\n", + "html": "<p><em>foo bar</em></p>\n", + "example": 366, + "start_line": 6625, + "end_line": 6629, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_ foo bar_\n", + "html": "<p>_ foo bar_</p>\n", + "example": 367, + "start_line": 6635, + "end_line": 6639, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "a_\"foo\"_\n", + "html": "<p>a_"foo"_</p>\n", + "example": 368, + "start_line": 6645, + "end_line": 6649, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo_bar_\n", + "html": "<p>foo_bar_</p>\n", + "example": 369, + "start_line": 6654, + "end_line": 6658, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "5_6_78\n", + "html": "<p>5_6_78</p>\n", + "example": 370, + "start_line": 6661, + "end_line": 6665, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c_\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f_\n", + "html": "<p>\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c_\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f_</p>\n", + "example": 371, + "start_line": 6668, + "end_line": 6672, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "aa_\"bb\"_cc\n", + "html": "<p>aa_"bb"_cc</p>\n", + "example": 372, + "start_line": 6678, + "end_line": 6682, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo-_(bar)_\n", + "html": "<p>foo-<em>(bar)</em></p>\n", + "example": 373, + "start_line": 6689, + "end_line": 6693, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo*\n", + "html": "<p>_foo*</p>\n", + "example": 374, + "start_line": 6701, + "end_line": 6705, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo bar *\n", + "html": "<p>*foo bar *</p>\n", + "example": 375, + "start_line": 6711, + "end_line": 6715, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo bar\n*\n", + "html": "<p>*foo bar\n*</p>\n", + "example": 376, + "start_line": 6720, + "end_line": 6726, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*(*foo)\n", + "html": "<p>*(*foo)</p>\n", + "example": 377, + "start_line": 6733, + "end_line": 6737, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*(*foo*)*\n", + "html": "<p><em>(<em>foo</em>)</em></p>\n", + "example": 378, + "start_line": 6743, + "end_line": 6747, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo*bar\n", + "html": "<p><em>foo</em>bar</p>\n", + "example": 379, + "start_line": 6752, + "end_line": 6756, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo bar _\n", + "html": "<p>_foo bar _</p>\n", + "example": 380, + "start_line": 6765, + "end_line": 6769, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_(_foo)\n", + "html": "<p>_(_foo)</p>\n", + "example": 381, + "start_line": 6775, + "end_line": 6779, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_(_foo_)_\n", + "html": "<p><em>(<em>foo</em>)</em></p>\n", + "example": 382, + "start_line": 6784, + "end_line": 6788, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo_bar\n", + "html": "<p>_foo_bar</p>\n", + "example": 383, + "start_line": 6793, + "end_line": 6797, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c_\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f\n", + "html": "<p>_\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c_\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f</p>\n", + "example": 384, + "start_line": 6800, + "end_line": 6804, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo_bar_baz_\n", + "html": "<p><em>foo_bar_baz</em></p>\n", + "example": 385, + "start_line": 6807, + "end_line": 6811, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_(bar)_.\n", + "html": "<p><em>(bar)</em>.</p>\n", + "example": 386, + "start_line": 6818, + "end_line": 6822, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo bar**\n", + "html": "<p><strong>foo bar</strong></p>\n", + "example": 387, + "start_line": 6827, + "end_line": 6831, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "** foo bar**\n", + "html": "<p>** foo bar**</p>\n", + "example": 388, + "start_line": 6837, + "end_line": 6841, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "a**\"foo\"**\n", + "html": "<p>a**"foo"**</p>\n", + "example": 389, + "start_line": 6848, + "end_line": 6852, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo**bar**\n", + "html": "<p>foo<strong>bar</strong></p>\n", + "example": 390, + "start_line": 6857, + "end_line": 6861, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo bar__\n", + "html": "<p><strong>foo bar</strong></p>\n", + "example": 391, + "start_line": 6866, + "end_line": 6870, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__ foo bar__\n", + "html": "<p>__ foo bar__</p>\n", + "example": 392, + "start_line": 6876, + "end_line": 6880, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__\nfoo bar__\n", + "html": "<p>__\nfoo bar__</p>\n", + "example": 393, + "start_line": 6884, + "end_line": 6890, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "a__\"foo\"__\n", + "html": "<p>a__"foo"__</p>\n", + "example": 394, + "start_line": 6896, + "end_line": 6900, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo__bar__\n", + "html": "<p>foo__bar__</p>\n", + "example": 395, + "start_line": 6905, + "end_line": 6909, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "5__6__78\n", + "html": "<p>5__6__78</p>\n", + "example": 396, + "start_line": 6912, + "end_line": 6916, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c__\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f__\n", + "html": "<p>\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c__\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f__</p>\n", + "example": 397, + "start_line": 6919, + "end_line": 6923, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo, __bar__, baz__\n", + "html": "<p><strong>foo, bar, baz</strong></p>\n", + "example": 398, + "start_line": 6926, + "end_line": 6930, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo-__(bar)__\n", + "html": "<p>foo-<strong>(bar)</strong></p>\n", + "example": 399, + "start_line": 6937, + "end_line": 6941, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo bar **\n", + "html": "<p>**foo bar **</p>\n", + "example": 400, + "start_line": 6950, + "end_line": 6954, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**(**foo)\n", + "html": "<p>**(**foo)</p>\n", + "example": 401, + "start_line": 6963, + "end_line": 6967, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*(**foo**)*\n", + "html": "<p><em>(<strong>foo</strong>)</em></p>\n", + "example": 402, + "start_line": 6973, + "end_line": 6977, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**\n", + "html": "<p><strong>Gomphocarpus (<em>Gomphocarpus physocarpus</em>, syn.\n<em>Asclepias physocarpa</em>)</strong></p>\n", + "example": 403, + "start_line": 6980, + "end_line": 6986, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo \"*bar*\" foo**\n", + "html": "<p><strong>foo "<em>bar</em>" foo</strong></p>\n", + "example": 404, + "start_line": 6989, + "end_line": 6993, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo**bar\n", + "html": "<p><strong>foo</strong>bar</p>\n", + "example": 405, + "start_line": 6998, + "end_line": 7002, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo bar __\n", + "html": "<p>__foo bar __</p>\n", + "example": 406, + "start_line": 7010, + "end_line": 7014, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__(__foo)\n", + "html": "<p>__(__foo)</p>\n", + "example": 407, + "start_line": 7020, + "end_line": 7024, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_(__foo__)_\n", + "html": "<p><em>(<strong>foo</strong>)</em></p>\n", + "example": 408, + "start_line": 7030, + "end_line": 7034, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo__bar\n", + "html": "<p>__foo__bar</p>\n", + "example": 409, + "start_line": 7039, + "end_line": 7043, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c__\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f\n", + "html": "<p>__\u043f\u0440\u0438\u0441\u0442\u0430\u043d\u044f\u043c__\u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f</p>\n", + "example": 410, + "start_line": 7046, + "end_line": 7050, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo__bar__baz__\n", + "html": "<p><strong>foo__bar__baz</strong></p>\n", + "example": 411, + "start_line": 7053, + "end_line": 7057, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__(bar)__.\n", + "html": "<p><strong>(bar)</strong>.</p>\n", + "example": 412, + "start_line": 7064, + "end_line": 7068, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo [bar](/url)*\n", + "html": "<p><em>foo <a href=\"/url\">bar</a></em></p>\n", + "example": 413, + "start_line": 7076, + "end_line": 7080, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo\nbar*\n", + "html": "<p><em>foo\nbar</em></p>\n", + "example": 414, + "start_line": 7083, + "end_line": 7089, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo __bar__ baz_\n", + "html": "<p><em>foo <strong>bar</strong> baz</em></p>\n", + "example": 415, + "start_line": 7095, + "end_line": 7099, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo _bar_ baz_\n", + "html": "<p><em>foo <em>bar</em> baz</em></p>\n", + "example": 416, + "start_line": 7102, + "end_line": 7106, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo_ bar_\n", + "html": "<p><em><em>foo</em> bar</em></p>\n", + "example": 417, + "start_line": 7109, + "end_line": 7113, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo *bar**\n", + "html": "<p><em>foo <em>bar</em></em></p>\n", + "example": 418, + "start_line": 7116, + "end_line": 7120, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo **bar** baz*\n", + "html": "<p><em>foo <strong>bar</strong> baz</em></p>\n", + "example": 419, + "start_line": 7123, + "end_line": 7127, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo**bar**baz*\n", + "html": "<p><em>foo<strong>bar</strong>baz</em></p>\n", + "example": 420, + "start_line": 7129, + "end_line": 7133, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo**bar*\n", + "html": "<p><em>foo**bar</em></p>\n", + "example": 421, + "start_line": 7153, + "end_line": 7157, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "***foo** bar*\n", + "html": "<p><em><strong>foo</strong> bar</em></p>\n", + "example": 422, + "start_line": 7166, + "end_line": 7170, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo **bar***\n", + "html": "<p><em>foo <strong>bar</strong></em></p>\n", + "example": 423, + "start_line": 7173, + "end_line": 7177, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo**bar***\n", + "html": "<p><em>foo<strong>bar</strong></em></p>\n", + "example": 424, + "start_line": 7180, + "end_line": 7184, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo***bar***baz\n", + "html": "<p>foo<em><strong>bar</strong></em>baz</p>\n", + "example": 425, + "start_line": 7191, + "end_line": 7195, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo******bar*********baz\n", + "html": "<p>foo<strong>bar</strong>***baz</p>\n", + "example": 426, + "start_line": 7197, + "end_line": 7201, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo **bar *baz* bim** bop*\n", + "html": "<p><em>foo <strong>bar <em>baz</em> bim</strong> bop</em></p>\n", + "example": 427, + "start_line": 7206, + "end_line": 7210, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo [*bar*](/url)*\n", + "html": "<p><em>foo <a href=\"/url\"><em>bar</em></a></em></p>\n", + "example": 428, + "start_line": 7213, + "end_line": 7217, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "** is not an empty emphasis\n", + "html": "<p>** is not an empty emphasis</p>\n", + "example": 429, + "start_line": 7222, + "end_line": 7226, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**** is not an empty strong emphasis\n", + "html": "<p>**** is not an empty strong emphasis</p>\n", + "example": 430, + "start_line": 7229, + "end_line": 7233, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo [bar](/url)**\n", + "html": "<p><strong>foo <a href=\"/url\">bar</a></strong></p>\n", + "example": 431, + "start_line": 7242, + "end_line": 7246, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo\nbar**\n", + "html": "<p><strong>foo\nbar</strong></p>\n", + "example": 432, + "start_line": 7249, + "end_line": 7255, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo _bar_ baz__\n", + "html": "<p><strong>foo <em>bar</em> baz</strong></p>\n", + "example": 433, + "start_line": 7261, + "end_line": 7265, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo __bar__ baz__\n", + "html": "<p><strong>foo bar baz</strong></p>\n", + "example": 434, + "start_line": 7268, + "end_line": 7272, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "____foo__ bar__\n", + "html": "<p><strong>foo bar</strong></p>\n", + "example": 435, + "start_line": 7275, + "end_line": 7279, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo **bar****\n", + "html": "<p><strong>foo bar</strong></p>\n", + "example": 436, + "start_line": 7282, + "end_line": 7286, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo *bar* baz**\n", + "html": "<p><strong>foo <em>bar</em> baz</strong></p>\n", + "example": 437, + "start_line": 7289, + "end_line": 7293, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo*bar*baz**\n", + "html": "<p><strong>foo<em>bar</em>baz</strong></p>\n", + "example": 438, + "start_line": 7296, + "end_line": 7300, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "***foo* bar**\n", + "html": "<p><strong><em>foo</em> bar</strong></p>\n", + "example": 439, + "start_line": 7303, + "end_line": 7307, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo *bar***\n", + "html": "<p><strong>foo <em>bar</em></strong></p>\n", + "example": 440, + "start_line": 7310, + "end_line": 7314, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo *bar **baz**\nbim* bop**\n", + "html": "<p><strong>foo <em>bar <strong>baz</strong>\nbim</em> bop</strong></p>\n", + "example": 441, + "start_line": 7319, + "end_line": 7325, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo [*bar*](/url)**\n", + "html": "<p><strong>foo <a href=\"/url\"><em>bar</em></a></strong></p>\n", + "example": 442, + "start_line": 7328, + "end_line": 7332, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__ is not an empty emphasis\n", + "html": "<p>__ is not an empty emphasis</p>\n", + "example": 443, + "start_line": 7337, + "end_line": 7341, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "____ is not an empty strong emphasis\n", + "html": "<p>____ is not an empty strong emphasis</p>\n", + "example": 444, + "start_line": 7344, + "end_line": 7348, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo ***\n", + "html": "<p>foo ***</p>\n", + "example": 445, + "start_line": 7354, + "end_line": 7358, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo *\\**\n", + "html": "<p>foo <em>*</em></p>\n", + "example": 446, + "start_line": 7361, + "end_line": 7365, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo *_*\n", + "html": "<p>foo <em>_</em></p>\n", + "example": 447, + "start_line": 7368, + "end_line": 7372, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo *****\n", + "html": "<p>foo *****</p>\n", + "example": 448, + "start_line": 7375, + "end_line": 7379, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo **\\***\n", + "html": "<p>foo <strong>*</strong></p>\n", + "example": 449, + "start_line": 7382, + "end_line": 7386, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo **_**\n", + "html": "<p>foo <strong>_</strong></p>\n", + "example": 450, + "start_line": 7389, + "end_line": 7393, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo*\n", + "html": "<p>*<em>foo</em></p>\n", + "example": 451, + "start_line": 7400, + "end_line": 7404, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo**\n", + "html": "<p><em>foo</em>*</p>\n", + "example": 452, + "start_line": 7407, + "end_line": 7411, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "***foo**\n", + "html": "<p>*<strong>foo</strong></p>\n", + "example": 453, + "start_line": 7414, + "end_line": 7418, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "****foo*\n", + "html": "<p>***<em>foo</em></p>\n", + "example": 454, + "start_line": 7421, + "end_line": 7425, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo***\n", + "html": "<p><strong>foo</strong>*</p>\n", + "example": 455, + "start_line": 7428, + "end_line": 7432, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo****\n", + "html": "<p><em>foo</em>***</p>\n", + "example": 456, + "start_line": 7435, + "end_line": 7439, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo ___\n", + "html": "<p>foo ___</p>\n", + "example": 457, + "start_line": 7445, + "end_line": 7449, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo _\\__\n", + "html": "<p>foo <em>_</em></p>\n", + "example": 458, + "start_line": 7452, + "end_line": 7456, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo _*_\n", + "html": "<p>foo <em>*</em></p>\n", + "example": 459, + "start_line": 7459, + "end_line": 7463, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo _____\n", + "html": "<p>foo _____</p>\n", + "example": 460, + "start_line": 7466, + "end_line": 7470, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo __\\___\n", + "html": "<p>foo <strong>_</strong></p>\n", + "example": 461, + "start_line": 7473, + "end_line": 7477, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "foo __*__\n", + "html": "<p>foo <strong>*</strong></p>\n", + "example": 462, + "start_line": 7480, + "end_line": 7484, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo_\n", + "html": "<p>_<em>foo</em></p>\n", + "example": 463, + "start_line": 7487, + "end_line": 7491, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo__\n", + "html": "<p><em>foo</em>_</p>\n", + "example": 464, + "start_line": 7498, + "end_line": 7502, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "___foo__\n", + "html": "<p>_<strong>foo</strong></p>\n", + "example": 465, + "start_line": 7505, + "end_line": 7509, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "____foo_\n", + "html": "<p>___<em>foo</em></p>\n", + "example": 466, + "start_line": 7512, + "end_line": 7516, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo___\n", + "html": "<p><strong>foo</strong>_</p>\n", + "example": 467, + "start_line": 7519, + "end_line": 7523, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo____\n", + "html": "<p><em>foo</em>___</p>\n", + "example": 468, + "start_line": 7526, + "end_line": 7530, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo**\n", + "html": "<p><strong>foo</strong></p>\n", + "example": 469, + "start_line": 7536, + "end_line": 7540, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*_foo_*\n", + "html": "<p><em><em>foo</em></em></p>\n", + "example": 470, + "start_line": 7543, + "end_line": 7547, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__foo__\n", + "html": "<p><strong>foo</strong></p>\n", + "example": 471, + "start_line": 7550, + "end_line": 7554, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_*foo*_\n", + "html": "<p><em><em>foo</em></em></p>\n", + "example": 472, + "start_line": 7557, + "end_line": 7561, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "****foo****\n", + "html": "<p><strong>foo</strong></p>\n", + "example": 473, + "start_line": 7567, + "end_line": 7571, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "____foo____\n", + "html": "<p><strong>foo</strong></p>\n", + "example": 474, + "start_line": 7574, + "end_line": 7578, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "******foo******\n", + "html": "<p><strong>foo</strong></p>\n", + "example": 475, + "start_line": 7585, + "end_line": 7589, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "***foo***\n", + "html": "<p><em><strong>foo</strong></em></p>\n", + "example": 476, + "start_line": 7594, + "end_line": 7598, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_____foo_____\n", + "html": "<p><em><strong>foo</strong></em></p>\n", + "example": 477, + "start_line": 7601, + "end_line": 7605, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo _bar* baz_\n", + "html": "<p><em>foo _bar</em> baz_</p>\n", + "example": 478, + "start_line": 7610, + "end_line": 7614, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo __bar *baz bim__ bam*\n", + "html": "<p><em>foo <strong>bar *baz bim</strong> bam</em></p>\n", + "example": 479, + "start_line": 7617, + "end_line": 7621, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**foo **bar baz**\n", + "html": "<p>**foo <strong>bar baz</strong></p>\n", + "example": 480, + "start_line": 7626, + "end_line": 7630, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*foo *bar baz*\n", + "html": "<p>*foo <em>bar baz</em></p>\n", + "example": 481, + "start_line": 7633, + "end_line": 7637, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*[bar*](/url)\n", + "html": "<p>*<a href=\"/url\">bar*</a></p>\n", + "example": 482, + "start_line": 7642, + "end_line": 7646, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_foo [bar_](/url)\n", + "html": "<p>_foo <a href=\"/url\">bar_</a></p>\n", + "example": 483, + "start_line": 7649, + "end_line": 7653, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*<img src=\"foo\" title=\"*\"/>\n", + "html": "<p>*<img src=\"foo\" title=\"*\"/></p>\n", + "example": 484, + "start_line": 7656, + "end_line": 7660, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**<a href=\"**\">\n", + "html": "<p>**<a href=\"**\"></p>\n", + "example": 485, + "start_line": 7663, + "end_line": 7667, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__<a href=\"__\">\n", + "html": "<p>__<a href=\"__\"></p>\n", + "example": 486, + "start_line": 7670, + "end_line": 7674, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "*a `*`*\n", + "html": "<p><em>a <code>*</code></em></p>\n", + "example": 487, + "start_line": 7677, + "end_line": 7681, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "_a `_`_\n", + "html": "<p><em>a <code>_</code></em></p>\n", + "example": 488, + "start_line": 7684, + "end_line": 7688, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "**a<http://foo.bar/?q=**>\n", + "html": "<p>**a<a href=\"http://foo.bar/?q=**\">http://foo.bar/?q=**</a></p>\n", + "example": 489, + "start_line": 7691, + "end_line": 7695, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "__a<http://foo.bar/?q=__>\n", + "html": "<p>__a<a href=\"http://foo.bar/?q=__\">http://foo.bar/?q=__</a></p>\n", + "example": 490, + "start_line": 7698, + "end_line": 7702, + "section": "Emphasis and strong emphasis", + "extensions": [] + }, + { + "markdown": "~~Hi~~ Hello, world!\n", + "html": "<p><del>Hi</del> Hello, world!</p>\n", + "example": 491, + "start_line": 7714, + "end_line": 7718, + "section": "Strikethrough (extension)", + "extensions": [ + "strikethrough" + ] + }, + { + "markdown": "This ~~has a\n\nnew paragraph~~.\n", + "html": "<p>This ~~has a</p>\n<p>new paragraph~~.</p>\n", + "example": 492, + "start_line": 7723, + "end_line": 7730, + "section": "Strikethrough (extension)", + "extensions": [ + "strikethrough" + ] + }, + { + "markdown": "[link](/uri \"title\")\n", + "html": "<p><a href=\"/uri\" title=\"title\">link</a></p>\n", + "example": 493, + "start_line": 7809, + "end_line": 7813, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](/uri)\n", + "html": "<p><a href=\"/uri\">link</a></p>\n", + "example": 494, + "start_line": 7818, + "end_line": 7822, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link]()\n", + "html": "<p><a href=\"\">link</a></p>\n", + "example": 495, + "start_line": 7827, + "end_line": 7831, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](<>)\n", + "formattedMarkdown": "[link]()", + "html": "<p><a href=\"\">link</a></p>\n", + "example": 496, + "start_line": 7834, + "end_line": 7838, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](/my uri)\n", + "html": "<p>[link](/my uri)</p>\n", + "example": 497, + "start_line": 7843, + "end_line": 7847, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](</my uri>)\n", + "html": "<p><a href=\"/my%20uri\">link</a></p>\n", + "example": 498, + "start_line": 7849, + "end_line": 7853, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](foo\nbar)\n", + "html": "<p>[link](foo\nbar)</p>\n", + "example": 499, + "start_line": 7858, + "end_line": 7864, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](<foo\nbar>)\n", + "html": "<p>[link](<foo\nbar>)</p>\n", + "example": 500, + "start_line": 7866, + "end_line": 7872, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[a](<b)c>)\n", + "html": "<p><a href=\"b)c\">a</a></p>\n", + "example": 501, + "start_line": 7877, + "end_line": 7881, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](<foo\\>)\n", + "html": "<p>[link](<foo>)</p>\n", + "example": 502, + "start_line": 7885, + "end_line": 7889, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[a](<b)c\n[a](<b)c>\n[a](<b>c)\n", + "html": "<p>[a](<b)c\n[a](<b)c>\n[a](<b>c)</p>\n", + "example": 503, + "start_line": 7894, + "end_line": 7902, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](\\(foo\\))\n", + "html": "<p><a href=\"(foo)\">link</a></p>\n", + "example": 504, + "start_line": 7906, + "end_line": 7910, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](foo(and(bar)))\n", + "html": "<p><a href=\"foo(and(bar))\">link</a></p>\n", + "example": 505, + "start_line": 7915, + "end_line": 7919, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](foo\\(and\\(bar\\))\n", + "html": "<p><a href=\"foo(and(bar)\">link</a></p>\n", + "example": 506, + "start_line": 7924, + "end_line": 7928, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](<foo(and(bar)>)\n", + "html": "<p><a href=\"foo(and(bar)\">link</a></p>\n", + "example": 507, + "start_line": 7931, + "end_line": 7935, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](foo\\)\\:)\n", + "html": "<p><a href=\"foo):\">link</a></p>\n", + "example": 508, + "start_line": 7941, + "end_line": 7945, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](#fragment)\n\n[link](http://example.com#fragment)\n\n[link](http://example.com?foo=3#frag)\n", + "html": "<p><a href=\"#fragment\">link</a></p>\n<p><a href=\"http://example.com#fragment\">link</a></p>\n<p><a href=\"http://example.com?foo=3#frag\">link</a></p>\n", + "example": 509, + "start_line": 7950, + "end_line": 7960, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](foo\\bar)\n", + "html": "<p><a href=\"foo%5Cbar\">link</a></p>\n", + "example": 510, + "start_line": 7966, + "end_line": 7970, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](foo%20bä)\n", + "html": "<p><a href=\"foo%20b%C3%A4\">link</a></p>\n", + "example": 511, + "start_line": 7982, + "end_line": 7986, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](\"title\")\n", + "html": "<p><a href=\"%22title%22\">link</a></p>\n", + "example": 512, + "start_line": 7993, + "end_line": 7997, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))\n", + "html": "<p><a href=\"/url\" title=\"title\">link</a>\n<a href=\"/url\" title=\"title\">link</a>\n<a href=\"/url\" title=\"title\">link</a></p>\n", + "example": 513, + "start_line": 8002, + "end_line": 8010, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](/url \"title \\\""\")\n", + "html": "<p><a href=\"/url\" title=\"title ""\">link</a></p>\n", + "example": 514, + "start_line": 8016, + "end_line": 8020, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](/url\u00a0\"title\")\n", + "formattedMarkdown": "[link](/url \"title\")", + "html": "<p><a href=\"/url%C2%A0%22title%22\">link</a></p>\n", + "example": 515, + "start_line": 8026, + "end_line": 8030, + "section": "Links", + "testMacro": "test", + "extensions": [] + }, + { + "markdown": "[link](/url \"title \"and\" title\")\n", + "html": "<p>[link](/url "title "and" title")</p>\n", + "example": 516, + "start_line": 8035, + "end_line": 8039, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link](/url 'title \"and\" title')\n", + "html": "<p><a href=\"/url\" title=\"title "and" title\">link</a></p>\n", + "example": 517, + "start_line": 8044, + "end_line": 8048, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link]( /uri\n \"title\" )\n", + "formattedMarkdown": "[link](/uri \"title\")", + "html": "<p><a href=\"/uri\" title=\"title\">link</a></p>\n", + "example": 518, + "start_line": 8068, + "end_line": 8073, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link] (/uri)\n", + "html": "<p>[link] (/uri)</p>\n", + "example": 519, + "start_line": 8079, + "end_line": 8083, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link [foo [bar]]](/uri)\n", + "html": "<p><a href=\"/uri\">link [foo [bar]]</a></p>\n", + "example": 520, + "start_line": 8089, + "end_line": 8093, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link] bar](/uri)\n", + "html": "<p>[link] bar](/uri)</p>\n", + "example": 521, + "start_line": 8096, + "end_line": 8100, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link [bar](/uri)\n", + "html": "<p>[link <a href=\"/uri\">bar</a></p>\n", + "example": 522, + "start_line": 8103, + "end_line": 8107, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link \\[bar](/uri)\n", + "html": "<p><a href=\"/uri\">link [bar</a></p>\n", + "example": 523, + "start_line": 8110, + "end_line": 8114, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link *foo **bar** `#`*](/uri)\n", + "html": "<p><a href=\"/uri\">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>\n", + "example": 524, + "start_line": 8119, + "end_line": 8123, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[![moon](moon.jpg)](/uri)\n", + "html": "<p><a href=\"/uri\"><img src=\"moon.jpg\" alt=\"moon\" /></a></p>\n", + "example": 525, + "start_line": 8126, + "end_line": 8130, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo [bar](/uri)](/uri)\n", + "html": "<p>[foo <a href=\"/uri\">bar</a>](/uri)</p>\n", + "example": 526, + "start_line": 8135, + "end_line": 8139, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo *[bar [baz](/uri)](/uri)*](/uri)\n", + "html": "<p>[foo <em>[bar <a href=\"/uri\">baz</a>](/uri)</em>](/uri)</p>\n", + "example": 527, + "start_line": 8142, + "end_line": 8146, + "section": "Links", + "extensions": [] + }, + { + "markdown": "![[[foo](uri1)](uri2)](uri3)\n", + "html": "<p><img src=\"uri3\" alt=\"[foo](uri2)\" /></p>\n", + "example": 528, + "start_line": 8149, + "end_line": 8153, + "section": "Links", + "extensions": [] + }, + { + "markdown": "*[foo*](/uri)\n", + "html": "<p>*<a href=\"/uri\">foo*</a></p>\n", + "example": 529, + "start_line": 8159, + "end_line": 8163, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo *bar](baz*)\n", + "html": "<p><a href=\"baz*\">foo *bar</a></p>\n", + "example": 530, + "start_line": 8166, + "end_line": 8170, + "section": "Links", + "extensions": [] + }, + { + "markdown": "*foo [bar* baz]\n", + "html": "<p><em>foo [bar</em> baz]</p>\n", + "example": 531, + "start_line": 8176, + "end_line": 8180, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo <bar attr=\"](baz)\">\n", + "html": "<p>[foo <bar attr=\"](baz)\"></p>\n", + "example": 532, + "start_line": 8186, + "end_line": 8190, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo`](/uri)`\n", + "html": "<p>[foo<code>](/uri)</code></p>\n", + "example": 533, + "start_line": 8193, + "end_line": 8197, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo<http://example.com/?search=](uri)>\n", + "html": "<p>[foo<a href=\"http://example.com/?search=%5D(uri)\">http://example.com/?search=](uri)</a></p>\n", + "example": 534, + "start_line": 8200, + "end_line": 8204, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][bar]\n\n[bar]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 535, + "start_line": 8238, + "end_line": 8244, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link [foo [bar]]][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">link [foo [bar]]</a></p>\n", + "example": 536, + "start_line": 8253, + "end_line": 8259, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link \\[bar][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">link [bar</a></p>\n", + "example": 537, + "start_line": 8262, + "end_line": 8268, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[link *foo **bar** `#`*][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">link <em>foo <strong>bar</strong> <code>#</code></em></a></p>\n", + "example": 538, + "start_line": 8273, + "end_line": 8279, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[![moon](moon.jpg)][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\"><img src=\"moon.jpg\" alt=\"moon\" /></a></p>\n", + "example": 539, + "start_line": 8282, + "end_line": 8288, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo [bar](/uri)][ref]\n\n[ref]: /uri\n", + "html": "<p>[foo <a href=\"/uri\">bar</a>]<a href=\"/uri\">ref</a></p>\n", + "example": 540, + "start_line": 8293, + "end_line": 8299, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri\n", + "html": "<p>[foo <em>bar <a href=\"/uri\">baz</a></em>]<a href=\"/uri\">ref</a></p>\n", + "example": 541, + "start_line": 8302, + "end_line": 8308, + "section": "Links", + "extensions": [] + }, + { + "markdown": "*[foo*][ref]\n\n[ref]: /uri\n", + "html": "<p>*<a href=\"/uri\">foo*</a></p>\n", + "example": 542, + "start_line": 8317, + "end_line": 8323, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo *bar][ref]\n\n[ref]: /uri\n", + "html": "<p><a href=\"/uri\">foo *bar</a></p>\n", + "example": 543, + "start_line": 8326, + "end_line": 8332, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo <bar attr=\"][ref]\">\n\n[ref]: /uri\n", + "html": "<p>[foo <bar attr=\"][ref]\"></p>\n", + "example": 544, + "start_line": 8338, + "end_line": 8344, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo`][ref]`\n\n[ref]: /uri\n", + "html": "<p>[foo<code>][ref]</code></p>\n", + "example": 545, + "start_line": 8347, + "end_line": 8353, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo<http://example.com/?search=][ref]>\n\n[ref]: /uri\n", + "html": "<p>[foo<a href=\"http://example.com/?search=%5D%5Bref%5D\">http://example.com/?search=][ref]</a></p>\n", + "example": 546, + "start_line": 8356, + "end_line": 8362, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][BaR]\n\n[bar]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 547, + "start_line": 8367, + "end_line": 8373, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[\u0422\u043e\u043b\u043f\u043e\u0439][\u0422\u043e\u043b\u043f\u043e\u0439] is a Russian word.\n\n[\u0422\u041e\u041b\u041f\u041e\u0419]: /url\n", + "html": "<p><a href=\"/url\">\u0422\u043e\u043b\u043f\u043e\u0439</a> is a Russian word.</p>\n", + "example": 548, + "start_line": 8378, + "end_line": 8384, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[Foo\n bar]: /url\n\n[Baz][Foo bar]\n", + "formattedMarkdown": "[Foo bar]: /url\n\n[Baz][Foo bar]", + "html": "<p><a href=\"/url\">Baz</a></p>\n", + "example": 549, + "start_line": 8390, + "end_line": 8397, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo] [bar]\n\n[bar]: /url \"title\"\n", + "html": "<p>[foo] <a href=\"/url\" title=\"title\">bar</a></p>\n", + "example": 550, + "start_line": 8403, + "end_line": 8409, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo]\n[bar]\n\n[bar]: /url \"title\"\n", + "html": "<p>[foo]\n<a href=\"/url\" title=\"title\">bar</a></p>\n", + "example": 551, + "start_line": 8412, + "end_line": 8420, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]\n", + "formattedMarkdown": "[foo]: /url1\n\n\n\n[bar][foo]", + "html": "<p><a href=\"/url1\">bar</a></p>\n", + "example": 552, + "start_line": 8453, + "end_line": 8461, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[bar][foo\\!]\n\n[foo!]: /url\n", + "html": "<p>[bar][foo!]</p>\n", + "example": 553, + "start_line": 8468, + "end_line": 8474, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][ref[]\n\n[ref[]: /uri\n", + "html": "<p>[foo][ref[]</p>\n<p>[ref[]: /uri</p>\n", + "example": 554, + "start_line": 8480, + "end_line": 8487, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][ref[bar]]\n\n[ref[bar]]: /uri\n", + "html": "<p>[foo][ref[bar]]</p>\n<p>[ref[bar]]: /uri</p>\n", + "example": 555, + "start_line": 8490, + "end_line": 8497, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[[[foo]]]\n\n[[[foo]]]: /url\n", + "html": "<p>[[[foo]]]</p>\n<p>[[[foo]]]: /url</p>\n", + "example": 556, + "start_line": 8500, + "end_line": 8507, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][ref\\[]\n\n[ref\\[]: /uri\n", + "html": "<p><a href=\"/uri\">foo</a></p>\n", + "example": 557, + "start_line": 8510, + "end_line": 8516, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[bar\\\\]: /uri\n\n[bar\\\\]\n", + "html": "<p><a href=\"/uri\">bar\\</a></p>\n", + "example": 558, + "start_line": 8521, + "end_line": 8527, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[]\n\n[]: /uri\n", + "html": "<p>[]</p>\n<p>[]: /uri</p>\n", + "example": 559, + "start_line": 8532, + "end_line": 8539, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[\n ]\n\n[\n ]: /uri\n", + "formattedMarkdown": "[\n]\n\n[\n]: /uri", + "html": "<p>[\n]</p>\n<p>[\n]: /uri</p>\n", + "example": 560, + "start_line": 8542, + "end_line": 8553, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 561, + "start_line": 8565, + "end_line": 8571, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\"><em>foo</em> bar</a></p>\n", + "example": 562, + "start_line": 8574, + "end_line": 8580, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[Foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">Foo</a></p>\n", + "example": 563, + "start_line": 8585, + "end_line": 8591, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a>\n[]</p>\n", + "example": 564, + "start_line": 8598, + "end_line": 8606, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 565, + "start_line": 8618, + "end_line": 8624, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\"><em>foo</em> bar</a></p>\n", + "example": 566, + "start_line": 8627, + "end_line": 8633, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p>[<a href=\"/url\" title=\"title\"><em>foo</em> bar</a>]</p>\n", + "example": 567, + "start_line": 8636, + "end_line": 8642, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[[bar [foo]\n\n[foo]: /url\n", + "html": "<p>[[bar <a href=\"/url\">foo</a></p>\n", + "example": 568, + "start_line": 8645, + "end_line": 8651, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[Foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><a href=\"/url\" title=\"title\">Foo</a></p>\n", + "example": 569, + "start_line": 8656, + "end_line": 8662, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo] bar\n\n[foo]: /url\n", + "html": "<p><a href=\"/url\">foo</a> bar</p>\n", + "example": 570, + "start_line": 8667, + "end_line": 8673, + "section": "Links", + "extensions": [] + }, + { + "markdown": "\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "<p>[foo]</p>\n", + "example": 571, + "start_line": 8679, + "end_line": 8685, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo*]: /url\n\n*[foo*]\n", + "html": "<p>*<a href=\"/url\">foo*</a></p>\n", + "example": 572, + "start_line": 8691, + "end_line": 8697, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][bar]\n\n[foo]: /url1\n[bar]: /url2\n", + "html": "<p><a href=\"/url2\">foo</a></p>\n", + "example": 573, + "start_line": 8703, + "end_line": 8710, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][]\n\n[foo]: /url1\n", + "html": "<p><a href=\"/url1\">foo</a></p>\n", + "example": 574, + "start_line": 8712, + "end_line": 8718, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo]()\n\n[foo]: /url1\n", + "html": "<p><a href=\"\">foo</a></p>\n", + "example": 575, + "start_line": 8722, + "end_line": 8728, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo](not a link)\n\n[foo]: /url1\n", + "html": "<p><a href=\"/url1\">foo</a>(not a link)</p>\n", + "example": 576, + "start_line": 8730, + "end_line": 8736, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url\n", + "html": "<p>[foo]<a href=\"/url\">bar</a></p>\n", + "example": 577, + "start_line": 8741, + "end_line": 8747, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2\n", + "html": "<p><a href=\"/url2\">foo</a><a href=\"/url1\">baz</a></p>\n", + "example": 578, + "start_line": 8753, + "end_line": 8760, + "section": "Links", + "extensions": [] + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2\n", + "html": "<p>[foo]<a href=\"/url1\">bar</a></p>\n", + "example": 579, + "start_line": 8766, + "end_line": 8773, + "section": "Links", + "extensions": [] + }, + { + "markdown": "![foo](/url \"title\")\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" /></p>\n", + "example": 580, + "start_line": 8789, + "end_line": 8793, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>\n", + "example": 581, + "start_line": 8796, + "end_line": 8802, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo ![bar](/url)](/url2)\n", + "html": "<p><img src=\"/url2\" alt=\"foo bar\" /></p>\n", + "example": 582, + "start_line": 8805, + "end_line": 8809, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo [bar](/url)](/url2)\n", + "html": "<p><img src=\"/url2\" alt=\"foo bar\" /></p>\n", + "example": 583, + "start_line": 8812, + "end_line": 8816, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", + "html": "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>\n", + "example": 584, + "start_line": 8826, + "end_line": 8832, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n", + "html": "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>\n", + "example": 585, + "start_line": 8835, + "end_line": 8841, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo](train.jpg)\n", + "html": "<p><img src=\"train.jpg\" alt=\"foo\" /></p>\n", + "example": 586, + "start_line": 8844, + "end_line": 8848, + "section": "Images", + "extensions": [] + }, + { + "markdown": "My ![foo bar](/path/to/train.jpg \"title\" )\n", + "formattedMarkdown": "My ![foo bar](/path/to/train.jpg \"title\")", + "html": "<p>My <img src=\"/path/to/train.jpg\" alt=\"foo bar\" title=\"title\" /></p>\n", + "example": 587, + "start_line": 8851, + "end_line": 8855, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo](<url>)\n", + "formattedMarkdown": "![foo](url)", + "html": "<p><img src=\"url\" alt=\"foo\" /></p>\n", + "example": 588, + "start_line": 8858, + "end_line": 8862, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![](/url)\n", + "html": "<p><img src=\"/url\" alt=\"\" /></p>\n", + "example": 589, + "start_line": 8865, + "end_line": 8869, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo][bar]\n\n[bar]: /url\n", + "html": "<p><img src=\"/url\" alt=\"foo\" /></p>\n", + "example": 590, + "start_line": 8874, + "end_line": 8880, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo][bar]\n\n[BAR]: /url\n", + "html": "<p><img src=\"/url\" alt=\"foo\" /></p>\n", + "example": 591, + "start_line": 8883, + "end_line": 8889, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" /></p>\n", + "example": 592, + "start_line": 8894, + "end_line": 8900, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>\n", + "example": 593, + "start_line": 8903, + "end_line": 8909, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![Foo][]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"Foo\" title=\"title\" /></p>\n", + "example": 594, + "start_line": 8914, + "end_line": 8920, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" />\n[]</p>\n", + "example": 595, + "start_line": 8926, + "end_line": 8934, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo\" title=\"title\" /></p>\n", + "example": 596, + "start_line": 8939, + "end_line": 8945, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>\n", + "example": 597, + "start_line": 8948, + "end_line": 8954, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n", + "html": "<p>![[foo]]</p>\n<p>[[foo]]: /url "title"</p>\n", + "example": 598, + "start_line": 8959, + "end_line": 8966, + "section": "Images", + "extensions": [] + }, + { + "markdown": "![Foo]\n\n[foo]: /url \"title\"\n", + "html": "<p><img src=\"/url\" alt=\"Foo\" title=\"title\" /></p>\n", + "example": 599, + "start_line": 8971, + "end_line": 8977, + "section": "Images", + "extensions": [] + }, + { + "markdown": "!\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "<p>![foo]</p>\n", + "example": 600, + "start_line": 8983, + "end_line": 8989, + "section": "Images", + "extensions": [] + }, + { + "markdown": "\\![foo]\n\n[foo]: /url \"title\"\n", + "html": "<p>!<a href=\"/url\" title=\"title\">foo</a></p>\n", + "example": 601, + "start_line": 8995, + "end_line": 9001, + "section": "Images", + "extensions": [] + }, + { + "markdown": "<http://foo.bar.baz>\n", + "html": "<p><a href=\"http://foo.bar.baz\">http://foo.bar.baz</a></p>\n", + "example": 602, + "start_line": 9028, + "end_line": 9032, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<http://foo.bar.baz/test?q=hello&id=22&boolean>\n", + "html": "<p><a href=\"http://foo.bar.baz/test?q=hello&id=22&boolean\">http://foo.bar.baz/test?q=hello&id=22&boolean</a></p>\n", + "example": 603, + "start_line": 9035, + "end_line": 9039, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<irc://foo.bar:2233/baz>\n", + "html": "<p><a href=\"irc://foo.bar:2233/baz\">irc://foo.bar:2233/baz</a></p>\n", + "example": 604, + "start_line": 9042, + "end_line": 9046, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<MAILTO:FOO@BAR.BAZ>\n", + "html": "<p><a href=\"MAILTO:FOO@BAR.BAZ\">MAILTO:FOO@BAR.BAZ</a></p>\n", + "example": 605, + "start_line": 9051, + "end_line": 9055, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<a+b+c:d>\n", + "html": "<p><a href=\"a+b+c:d\">a+b+c:d</a></p>\n", + "example": 606, + "start_line": 9063, + "end_line": 9067, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<made-up-scheme://foo,bar>\n", + "html": "<p><a href=\"made-up-scheme://foo,bar\">made-up-scheme://foo,bar</a></p>\n", + "example": 607, + "start_line": 9070, + "end_line": 9074, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<http://../>\n", + "html": "<p><a href=\"http://../\">http://../</a></p>\n", + "example": 608, + "start_line": 9077, + "end_line": 9081, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<localhost:5001/foo>\n", + "html": "<p><a href=\"localhost:5001/foo\">localhost:5001/foo</a></p>\n", + "example": 609, + "start_line": 9084, + "end_line": 9088, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<http://foo.bar/baz bim>\n", + "html": "<p><http://foo.bar/baz bim></p>\n", + "example": 610, + "start_line": 9093, + "end_line": 9097, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<http://example.com/\\[\\>\n", + "html": "<p><a href=\"http://example.com/%5C%5B%5C\">http://example.com/\\[\\</a></p>\n", + "example": 611, + "start_line": 9102, + "end_line": 9106, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<foo@bar.example.com>\n", + "html": "<p><a href=\"mailto:foo@bar.example.com\">foo@bar.example.com</a></p>\n", + "example": 612, + "start_line": 9124, + "end_line": 9128, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<foo+special@Bar.baz-bar0.com>\n", + "html": "<p><a href=\"mailto:foo+special@Bar.baz-bar0.com\">foo+special@Bar.baz-bar0.com</a></p>\n", + "example": 613, + "start_line": 9131, + "end_line": 9135, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<foo\\+@bar.example.com>\n", + "html": "<p><foo+@bar.example.com></p>\n", + "example": 614, + "start_line": 9140, + "end_line": 9144, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<>\n", + "html": "<p><></p>\n", + "example": 615, + "start_line": 9149, + "end_line": 9153, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "< http://foo.bar >\n", + "html": "<p>< http://foo.bar ></p>\n", + "example": 616, + "start_line": 9156, + "end_line": 9160, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<m:abc>\n", + "html": "<p><m:abc></p>\n", + "example": 617, + "start_line": 9163, + "end_line": 9167, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "<foo.bar.baz>\n", + "html": "<p><foo.bar.baz></p>\n", + "example": 618, + "start_line": 9170, + "end_line": 9174, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "http://example.com\n", + "html": "<p>http://example.com</p>\n", + "example": 619, + "start_line": 9177, + "end_line": 9181, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "foo@bar.example.com\n", + "html": "<p>foo@bar.example.com</p>\n", + "example": 620, + "start_line": 9184, + "end_line": 9188, + "section": "Autolinks", + "extensions": [] + }, + { + "markdown": "www.commonmark.org\n", + "html": "<p><a href=\"http://www.commonmark.org\">www.commonmark.org</a></p>\n", + "example": 621, + "start_line": 9213, + "end_line": 9217, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "Visit www.commonmark.org/help for more information.\n", + "html": "<p>Visit <a href=\"http://www.commonmark.org/help\">www.commonmark.org/help</a> for more information.</p>\n", + "example": 622, + "start_line": 9221, + "end_line": 9225, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "Visit www.commonmark.org.\n\nVisit www.commonmark.org/a.b.\n", + "html": "<p>Visit <a href=\"http://www.commonmark.org\">www.commonmark.org</a>.</p>\n<p>Visit <a href=\"http://www.commonmark.org/a.b\">www.commonmark.org/a.b</a>.</p>\n", + "example": 623, + "start_line": 9233, + "end_line": 9240, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "www.google.com/search?q=Markup+(business)\n\nwww.google.com/search?q=Markup+(business)))\n\n(www.google.com/search?q=Markup+(business))\n\n(www.google.com/search?q=Markup+(business)\n", + "html": "<p><a href=\"http://www.google.com/search?q=Markup+(business)\">www.google.com/search?q=Markup+(business)</a></p>\n<p><a href=\"http://www.google.com/search?q=Markup+(business)\">www.google.com/search?q=Markup+(business)</a>))</p>\n<p>(<a href=\"http://www.google.com/search?q=Markup+(business)\">www.google.com/search?q=Markup+(business)</a>)</p>\n<p>(<a href=\"http://www.google.com/search?q=Markup+(business)\">www.google.com/search?q=Markup+(business)</a></p>\n", + "example": 624, + "start_line": 9247, + "end_line": 9260, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "www.google.com/search?q=(business))+ok\n", + "html": "<p><a href=\"http://www.google.com/search?q=(business))+ok\">www.google.com/search?q=(business))+ok</a></p>\n", + "example": 625, + "start_line": 9266, + "end_line": 9270, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "www.google.com/search?q=commonmark&hl=en\n\nwww.google.com/search?q=commonmark&hl;\n", + "html": "<p><a href=\"http://www.google.com/search?q=commonmark&hl=en\">www.google.com/search?q=commonmark&hl=en</a></p>\n<p><a href=\"http://www.google.com/search?q=commonmark\">www.google.com/search?q=commonmark</a>&hl;</p>\n", + "example": 626, + "start_line": 9277, + "end_line": 9284, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "www.commonmark.org/he<lp\n", + "html": "<p><a href=\"http://www.commonmark.org/he\">www.commonmark.org/he</a><lp</p>\n", + "example": 627, + "start_line": 9288, + "end_line": 9292, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "http://commonmark.org\n\n(Visit https://encrypted.google.com/search?q=Markup+(business))\n\nAnonymous FTP is available at ftp://foo.bar.baz.\n", + "html": "<p><a href=\"http://commonmark.org\">http://commonmark.org</a></p>\n<p>(Visit <a href=\"https://encrypted.google.com/search?q=Markup+(business)\">https://encrypted.google.com/search?q=Markup+(business)</a>)</p>\n<p>Anonymous FTP is available at <a href=\"ftp://foo.bar.baz\">ftp://foo.bar.baz</a>.</p>\n", + "example": 628, + "start_line": 9299, + "end_line": 9309, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "foo@bar.baz\n", + "html": "<p><a href=\"mailto:foo@bar.baz\">foo@bar.baz</a></p>\n", + "example": 629, + "start_line": 9325, + "end_line": 9329, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "hello@mail+xyz.example isn't valid, but hello+xyz@mail.example is.\n", + "html": "<p>hello@mail+xyz.example isn't valid, but <a href=\"mailto:hello+xyz@mail.example\">hello+xyz@mail.example</a> is.</p>\n", + "example": 630, + "start_line": 9333, + "end_line": 9337, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "a.b-c_d@a.b\n\na.b-c_d@a.b.\n\na.b-c_d@a.b-\n\na.b-c_d@a.b_\n", + "html": "<p><a href=\"mailto:a.b-c_d@a.b\">a.b-c_d@a.b</a></p>\n<p><a href=\"mailto:a.b-c_d@a.b\">a.b-c_d@a.b</a>.</p>\n<p>a.b-c_d@a.b-</p>\n<p>a.b-c_d@a.b_</p>\n", + "example": 631, + "start_line": 9343, + "end_line": 9356, + "section": "Autolinks (extension)", + "extensions": [ + "autolink" + ] + }, + { + "markdown": "<a><bab><c2c>\n", + "html": "<p><a><bab><c2c></p>\n", + "example": 632, + "start_line": 9434, + "end_line": 9438, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<a/><b2/>\n", + "html": "<p><a/><b2/></p>\n", + "example": 633, + "start_line": 9443, + "end_line": 9447, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<a /><b2\ndata=\"foo\" >\n", + "html": "<p><a /><b2\ndata=\"foo\" ></p>\n", + "example": 634, + "start_line": 9452, + "end_line": 9458, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<a foo=\"bar\" bam = 'baz <em>\"</em>'\n_boolean zoop:33=zoop:33 />\n", + "html": "<p><a foo=\"bar\" bam = 'baz <em>\"</em>'\n_boolean zoop:33=zoop:33 /></p>\n", + "example": 635, + "start_line": 9463, + "end_line": 9469, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "Foo <responsive-image src=\"foo.jpg\" />\n", + "html": "<p>Foo <responsive-image src=\"foo.jpg\" /></p>\n", + "example": 636, + "start_line": 9474, + "end_line": 9478, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<33> <__>\n", + "html": "<p><33> <__></p>\n", + "example": 637, + "start_line": 9483, + "end_line": 9487, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<a h*#ref=\"hi\">\n", + "html": "<p><a h*#ref="hi"></p>\n", + "example": 638, + "start_line": 9492, + "end_line": 9496, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<a href=\"hi'> <a href=hi'>\n", + "html": "<p><a href="hi'> <a href=hi'></p>\n", + "example": 639, + "start_line": 9501, + "end_line": 9505, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop />\n", + "html": "<p>< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop /></p>\n", + "example": 640, + "start_line": 9510, + "end_line": 9520, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<a href='bar'title=title>\n", + "html": "<p><a href='bar'title=title></p>\n", + "example": 641, + "start_line": 9525, + "end_line": 9529, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "</a></foo >\n", + "html": "<p></a></foo ></p>\n", + "example": 642, + "start_line": 9534, + "end_line": 9538, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "</a href=\"foo\">\n", + "html": "<p></a href="foo"></p>\n", + "example": 643, + "start_line": 9543, + "end_line": 9547, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "foo <!-- this is a --\ncomment - with hyphens -->\n", + "html": "<p>foo <!-- this is a --\ncomment - with hyphens --></p>\n", + "example": 644, + "start_line": 9552, + "end_line": 9558, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "foo <!--> foo -->\n\nfoo <!---> foo -->\n", + "html": "<p>foo <!--> foo --></p>\n<p>foo <!---> foo --></p>\n", + "example": 645, + "start_line": 9560, + "end_line": 9567, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "foo <?php echo $a; ?>\n", + "html": "<p>foo <?php echo $a; ?></p>\n", + "example": 646, + "start_line": 9572, + "end_line": 9576, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "foo <!ELEMENT br EMPTY>\n", + "html": "<p>foo <!ELEMENT br EMPTY></p>\n", + "example": 647, + "start_line": 9581, + "end_line": 9585, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "foo <![CDATA[>&<]]>\n", + "html": "<p>foo <![CDATA[>&<]]></p>\n", + "example": 648, + "start_line": 9590, + "end_line": 9594, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "foo <a href=\"ö\">\n", + "html": "<p>foo <a href=\"ö\"></p>\n", + "example": 649, + "start_line": 9600, + "end_line": 9604, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "foo <a href=\"\\*\">\n", + "html": "<p>foo <a href=\"\\*\"></p>\n", + "example": 650, + "start_line": 9609, + "end_line": 9613, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<a href=\"\\\"\">\n", + "html": "<p><a href="""></p>\n", + "example": 651, + "start_line": 9616, + "end_line": 9620, + "section": "Raw HTML", + "extensions": [] + }, + { + "markdown": "<strong> <title> <style> <em>\n\n<blockquote>\n <xmp> is disallowed. <XMP> is also disallowed.\n</blockquote>\n", + "html": "<p><strong> <title> <style> <em></p>\n<blockquote>\n <xmp> is disallowed. <XMP> is also disallowed.\n</blockquote>\n", + "example": 652, + "start_line": 9647, + "end_line": 9658, + "section": "Disallowed Raw HTML (extension)", + "extensions": [ + "tagfilter" + ] + }, + { + "markdown": "foo \nbaz\n", + "html": "<p>foo<br />\nbaz</p>\n", + "example": 653, + "start_line": 9669, + "end_line": 9675, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "foo\\\nbaz\n", + "html": "<p>foo<br />\nbaz</p>\n", + "example": 654, + "start_line": 9681, + "end_line": 9687, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "foo \nbaz\n", + "html": "<p>foo<br />\nbaz</p>\n", + "example": 655, + "start_line": 9692, + "end_line": 9698, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "foo \n bar\n", + "formattedMarkdown": "foo \nbar", + "html": "<p>foo<br />\nbar</p>\n", + "example": 656, + "start_line": 9703, + "end_line": 9709, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "foo\\\n bar\n", + "formattedMarkdown": "foo\\\nbar", + "html": "<p>foo<br />\nbar</p>\n", + "example": 657, + "start_line": 9712, + "end_line": 9718, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "*foo \nbar*\n", + "html": "<p><em>foo<br />\nbar</em></p>\n", + "example": 658, + "start_line": 9724, + "end_line": 9730, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "*foo\\\nbar*\n", + "html": "<p><em>foo<br />\nbar</em></p>\n", + "example": 659, + "start_line": 9733, + "end_line": 9739, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "`code \nspan`\n", + "html": "<p><code>code span</code></p>\n", + "example": 660, + "start_line": 9744, + "end_line": 9749, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "`code\\\nspan`\n", + "html": "<p><code>code\\ span</code></p>\n", + "example": 661, + "start_line": 9752, + "end_line": 9757, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "<a href=\"foo \nbar\">\n", + "html": "<p><a href=\"foo \nbar\"></p>\n", + "example": 662, + "start_line": 9762, + "end_line": 9768, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "<a href=\"foo\\\nbar\">\n", + "html": "<p><a href=\"foo\\\nbar\"></p>\n", + "example": 663, + "start_line": 9771, + "end_line": 9777, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "foo\\\n", + "html": "<p>foo\\</p>\n", + "example": 664, + "start_line": 9784, + "end_line": 9788, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "foo \n", + "html": "<p>foo</p>\n", + "example": 665, + "start_line": 9791, + "end_line": 9795, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "### foo\\\n", + "html": "<h3>foo\\</h3>\n", + "example": 666, + "start_line": 9798, + "end_line": 9802, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "### foo \n", + "formattedMarkdown": "### foo", + "html": "<h3>foo</h3>\n", + "example": 667, + "start_line": 9805, + "end_line": 9809, + "section": "Hard line breaks", + "extensions": [] + }, + { + "markdown": "foo\nbaz\n", + "html": "<p>foo\nbaz</p>\n", + "example": 668, + "start_line": 9820, + "end_line": 9826, + "section": "Soft line breaks", + "extensions": [] + }, + { + "markdown": "foo \n baz\n", + "formattedMarkdown": "foo \nbaz", + "html": "<p>foo\nbaz</p>\n", + "example": 669, + "start_line": 9832, + "end_line": 9838, + "section": "Soft line breaks", + "extensions": [] + }, + { + "markdown": "hello $.;'there\n", + "html": "<p>hello $.;'there</p>\n", + "example": 670, + "start_line": 9852, + "end_line": 9856, + "section": "Textual content", + "extensions": [] + }, + { + "markdown": "Foo \u03c7\u03c1\u1fc6\u03bd\n", + "html": "<p>Foo \u03c7\u03c1\u1fc6\u03bd</p>\n", + "example": 671, + "start_line": 9859, + "end_line": 9863, + "section": "Textual content", + "extensions": [] + }, + { + "markdown": "Multiple spaces\n", + "html": "<p>Multiple spaces</p>\n", + "example": 672, + "start_line": 9868, + "end_line": 9872, + "section": "Textual content", + "extensions": [] + } +] \ No newline at end of file From b87db9c405924260f6fc6e86f91f4190dc8d1a31 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi <yacintmimi@gmail.com> Date: Sat, 9 Sep 2023 17:38:10 -0400 Subject: [PATCH 5/9] Add markdown as a dependency of rustfmt --- Cargo.lock | 43 +++++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 1 + 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 76adbb1119f..9f2a8e9b5c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -383,6 +383,18 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "markdown" +version = "0.1.0" +dependencies = [ + "itertools", + "pulldown-cmark", + "serde", + "serde_json", + "unicode-segmentation", + "unicode-width", +] + [[package]] name = "matchers" version = "0.1.0" @@ -394,9 +406,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.4.1" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "nu-ansi-term" @@ -445,6 +457,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "pulldown-cmark" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + [[package]] name = "quote" version = "1.0.26" @@ -525,6 +548,7 @@ dependencies = [ "ignore", "itertools", "lazy_static", + "markdown", "regex", "rustfmt-config_proc_macro", "serde", @@ -777,6 +801,15 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-ident" version = "1.0.8" @@ -813,6 +846,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + [[package]] name = "walkdir" version = "2.3.2" diff --git a/Cargo.toml b/Cargo.toml index ce7cfec9ba0..ddc17a568f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,6 +58,7 @@ unicode-width = "0.1" unicode-properties = { version = "0.1", default-features = false, features = ["general-category"] } rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" } +markdown = { version = "0.1", path = "markdown" } # Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them. From 22951198e488f1ab75ce2f4d0690269f3aff3246 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi <yacintmimi@gmail.com> Date: Fri, 23 Dec 2022 23:12:59 -0500 Subject: [PATCH 6/9] implement formatting code blocks in markdown files The `rewrite_markdown` function will take markdown as input and apply rustfmt on rust code blocks. Because of how `pulldown-cmark-to-cmark` is implemented there will be some light rewriting of the markdown file outside of code block reformatting. This mostly relates to updating newlines after markdown elements like headers and lists, and possibly updating the indentation of indented code blocks. In the future we may even consider implementing doc comment rewriting in terms of `rewrite_markdown`. --- src/lib.rs | 1 + src/markdown.rs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/markdown.rs diff --git a/src/lib.rs b/src/lib.rs index 8800e200fa4..1614f347f5a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -76,6 +76,7 @@ mod imports; mod items; mod lists; mod macros; +mod markdown; mod matches; mod missed_spans; pub(crate) mod modules; diff --git a/src/markdown.rs b/src/markdown.rs new file mode 100644 index 00000000000..c81a381ceb3 --- /dev/null +++ b/src/markdown.rs @@ -0,0 +1,44 @@ +use crate::comment::{hide_sharp_behind_comment, trim_custom_comment_prefix, CodeBlockAttribute}; +use crate::Config; +use itertools::Itertools; +use markdown::MarkdownFormatter; +use std::borrow::Cow; + +/// Rewrite markdown input. +/// +/// The main goal of this function is to reformat rust code blocks in markdown text. +/// However, there will be some light reformatting of other markdown items aside from code blocks. +/// +/// **Note:** The content of indented codeblocks will not be formatted, but indentation may change. +pub(crate) fn rewrite_markdown<'a, 'c>(input: &'a str, config: &'c Config) -> Cow<'a, str> { + let rewrite_rust_code_block = |info_string: &str, code_block_buffer: String| { + let is_buffer_empty = code_block_buffer.trim().is_empty(); + let is_formattable_code = + |info_string| CodeBlockAttribute::new(info_string).is_formattable_rust(); + + if is_buffer_empty || !is_formattable_code(info_string) { + return code_block_buffer; + } + + // First, comment out hidden rustdoc lines as they would prevent us from properly + // parsing and formatting the code snippet. + let with_hidden_rustdoc_lines = code_block_buffer + .lines() + .map(|line| hide_sharp_behind_comment(line)) + .join("\n"); + + if let Some(formatted) = + crate::format_code_block(&with_hidden_rustdoc_lines, &config, false) + { + trim_custom_comment_prefix(&formatted.snippet).into() + } else { + trim_custom_comment_prefix(&code_block_buffer).into() + } + }; + + let formatter = MarkdownFormatter::new(input, rewrite_rust_code_block); + match formatter.format() { + Ok(text) => text.into(), + Err(_) => input.into(), + } +} From 35c2f317d299d7b6a391fa4749775df686c81291 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi <yacintmimi@gmail.com> Date: Sat, 24 Dec 2022 01:33:15 -0500 Subject: [PATCH 7/9] Allow users to format rust code in markdown code blocks Now users can envoke rustfmt directly with a markdown file and the rust code within that file will be reformatted e.g. `rustfmt README.md` --- src/formatting.rs | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/formatting.rs b/src/formatting.rs index 8948650fc0c..34faf6e8fae 100644 --- a/src/formatting.rs +++ b/src/formatting.rs @@ -2,6 +2,7 @@ use std::collections::HashMap; use std::io::{self, Write}; +use std::path::PathBuf; use std::time::{Duration, Instant}; use rustc_ast::ast; @@ -11,6 +12,7 @@ use self::newline_style::apply_newline_style; use crate::comment::{CharClasses, FullCodeCharKind}; use crate::config::{Config, FileName, Verbosity}; use crate::formatting::generated::is_generated_file; +use crate::markdown::rewrite_markdown; use crate::modules::Module; use crate::parse::parser::{DirectoryOwnership, Parser, ParserError}; use crate::parse::session::ParseSess; @@ -35,6 +37,14 @@ impl<'b, T: Write + 'b> Session<'b, T> { return Err(ErrorKind::VersionMismatch); } + match input { + Input::File(ref path) if path.extension().map(|ext| ext == "md").unwrap_or(false) => { + let config = self.config.clone(); + return format_markdown_code_snippets(path.clone(), &config, self); + } + _ => {} + } + rustc_span::create_session_if_not_set_then(self.config.edition().into(), |_| { if self.config.disable_all_formatting() { // When the input is from stdin, echo back the input. @@ -174,6 +184,28 @@ fn format_project<T: FormatHandler>( Ok(context.report) } +fn format_markdown_code_snippets<T: FormatHandler>( + path: PathBuf, + config: &Config, + handler: &mut T, +) -> Result<FormatReport, ErrorKind> { + let input = std::fs::read_to_string(&path)?; + let mut result = rewrite_markdown(&input, config).into_owned(); + + if !result.ends_with('\n') { + // Add a trailing newline if needed + result.push('\n'); + } + + apply_newline_style(config.newline_style(), &mut result, &input); + + let file_name = FileName::Real(path); + let mut report = FormatReport::new(); + handler.handle_formatted_file(None, file_name, result, &mut report)?; + + Ok(report) +} + // Used for formatting files. struct FormatContext<'a, T: FormatHandler> { krate: &'a ast::Crate, From 079c3aff35bf4e06e36e3e8fef491e8d388a87a0 Mon Sep 17 00:00:00 2001 From: Yacin Tmimi <yacintmimi@gmail.com> Date: Sat, 24 Dec 2022 01:42:22 -0500 Subject: [PATCH 8/9] Allow mardown files in system tests This will make it easeir to write tests for markdown codeblock reformatting. --- src/test/mod.rs | 4 +- tests/source/markdown/example.md | 64 ++++++++++++++++++++++++++++++++ tests/target/markdown/example.md | 60 ++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 tests/source/markdown/example.md create mode 100644 tests/target/markdown/example.md diff --git a/src/test/mod.rs b/src/test/mod.rs index c8137c1bd28..67894038fd4 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -109,7 +109,9 @@ fn get_test_files(path: &Path, recursive: bool) -> Vec<PathBuf> { let path = entry.path(); if path.is_dir() && recursive { files.append(&mut get_test_files(&path, recursive)); - } else if path.extension().map_or(false, |f| f == "rs") && !is_file_skip(&path) { + } else if path.extension().map_or(false, |f| f == "rs" || f == "md") + && !is_file_skip(&path) + { files.push(path); } } diff --git a/tests/source/markdown/example.md b/tests/source/markdown/example.md new file mode 100644 index 00000000000..f3ecc78f0d9 --- /dev/null +++ b/tests/source/markdown/example.md @@ -0,0 +1,64 @@ +# Testing rustfmts support for formatting code blocks in markdown files + +The goal here is to format rust code blocks in markdown files.\ +Formatting will _mostly_ impact unformatted code blocks, however there will be minor changes to markdown constructs outside of code blocks. For example, aligning GitHub Flavored Markdown (GFM) tables. + + +```rust +fn main() { + println!( "Hello world!" + ) +} +``` + +Here's an indented code block that won't be formatted + + fn main() { + println!( "Hello world!" + ) + } + +> > Here's a code block in a blockquote +> > ``` rust +> > fn main() { +> > println!( "Hello world!" +> > ) +> > } +> > ``` + +* Here's a code block in a list! + ```rust + fn main() { + println!( "Hello world!" + ) + } + ``` + +>> * Here's a code block in a deeply nested markdown context +>> * ```rust +>> fn main() { +>> println!( "Hello world!" +>> ) +>> } +>> ``` + +<p>Markdown also support inline HTML</p> + +Oh and we've got some cool support for aligning tables: + +| column 1 | column 2 | column 3| +| :---: | :--- | ---: | +| values for column 1 | values for column 2 | values for column 3 | +| 😁😁 | 🎉🎉🎉 | 😁 :^) :^)| + +Check out the [commonmark spec]! + +[commonmark spec]: https://spec.commonmark.org/0.30/ + +Look we can also link to rust traits or types like [`Debug`] and [`Vec`]. +Some additional text with [brackets]. what if I manually \[esacpe the bracket\]? looks like they stay escaped! + + +[a dead link]: https://this/link/isnt/used + +[`Debug`]: core::fmt::Debug diff --git a/tests/target/markdown/example.md b/tests/target/markdown/example.md new file mode 100644 index 00000000000..79278af717d --- /dev/null +++ b/tests/target/markdown/example.md @@ -0,0 +1,60 @@ +# Testing rustfmts support for formatting code blocks in markdown files + +The goal here is to format rust code blocks in markdown files.\ +Formatting will _mostly_ impact unformatted code blocks, however there will be minor changes to markdown constructs outside of code blocks. For example, aligning GitHub Flavored Markdown (GFM) tables. + + +```rust +fn main() { + println!("Hello world!") +} +``` + +Here's an indented code block that won't be formatted + + fn main() { + println!( "Hello world!" + ) + } + +> > Here's a code block in a blockquote +> > ``` rust +> > fn main() { +> > println!("Hello world!") +> > } +> > ``` + +* Here's a code block in a list! + ```rust + fn main() { + println!("Hello world!") + } + ``` + +> > * Here's a code block in a deeply nested markdown context +> > * ```rust +> > fn main() { +> > println!("Hello world!") +> > } +> > ``` + +<p>Markdown also support inline HTML</p> + +Oh and we've got some cool support for aligning tables: + +| column 1 | column 2 | column 3 | +| :-----------------: | :------------------ | ------------------: | +| values for column 1 | values for column 2 | values for column 3 | +| 😁😁 | 🎉🎉🎉 | 😁 :^) :^) | + +Check out the [commonmark spec]! + +[commonmark spec]: https://spec.commonmark.org/0.30/ + +Look we can also link to rust traits or types like [`Debug`] and [`Vec`]. +Some additional text with [brackets]. what if I manually \[esacpe the bracket\]? looks like they stay escaped! + + +[a dead link]: https://this/link/isnt/used + +[`Debug`]: core::fmt::Debug From f445fee08942433281764702f4b87a1dfca5c6ad Mon Sep 17 00:00:00 2001 From: Yacin Tmimi <yacintmimi@gmail.com> Date: Mon, 11 Sep 2023 01:09:26 -0400 Subject: [PATCH 9/9] run the markdown crate's tests during rustfmt CI --- ci/build_and_test.bat | 5 +++++ ci/build_and_test.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ci/build_and_test.bat b/ci/build_and_test.bat index 16608a4aaa7..ec3425a767a 100755 --- a/ci/build_and_test.bat +++ b/ci/build_and_test.bat @@ -17,3 +17,8 @@ cargo test || exit /b 1 cd config_proc_macro || exit /b 1 cargo build --locked || exit /b 1 cargo test || exit /b 1 + +cd ../markdown || exit /b 1 +:: Build markdown crate and generate tests +cargo build --locked -F gen-tests || exit /b 1 +cargo test || exit /b 1 diff --git a/ci/build_and_test.sh b/ci/build_and_test.sh index 207da362fd6..3cdf15efad4 100755 --- a/ci/build_and_test.sh +++ b/ci/build_and_test.sh @@ -21,3 +21,8 @@ cargo test cd config_proc_macro cargo build --locked cargo test + +cd ../markdown +# Build markdown crate and generate tests +cargo build --locked -F gen-tests +cargo test