diff options
-rw-r--r-- | src/construct/character_reference.rs | 2 | ||||
-rw-r--r-- | src/construct/heading_setext.rs | 1 | ||||
-rw-r--r-- | src/construct/partial_title.rs | 1 | ||||
-rw-r--r-- | src/content/flow.rs | 1 | ||||
-rw-r--r-- | src/content/string.rs | 2 | ||||
-rw-r--r-- | tests/html_flow.rs | 126 |
6 files changed, 58 insertions, 75 deletions
diff --git a/src/construct/character_reference.rs b/src/construct/character_reference.rs index af9c02e..c946dae 100644 --- a/src/construct/character_reference.rs +++ b/src/construct/character_reference.rs @@ -51,8 +51,6 @@ //! [decode_numeric]: crate::util::decode_character_reference::decode_numeric //! [character_reference_names]: crate::constant::CHARACTER_REFERENCE_NAMES //! [html]: https://html.spec.whatwg.org/multipage/parsing.html#character-reference-state -//! -//! <!-- To do: link `string`, `text` --> use crate::constant::{ CHARACTER_REFERENCE_DECIMAL_SIZE_MAX, CHARACTER_REFERENCE_HEXADECIMAL_SIZE_MAX, diff --git a/src/construct/heading_setext.rs b/src/construct/heading_setext.rs index 579fa71..a418041 100644 --- a/src/construct/heading_setext.rs +++ b/src/construct/heading_setext.rs @@ -126,7 +126,6 @@ fn text_inside(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { /// ``` fn text_continue(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { // Needed to connect the text. - // To do: does it work? tokenizer.enter(TokenType::HeadingSetextText); tokenizer.events.pop(); tokenizer.events.pop(); diff --git a/src/construct/partial_title.rs b/src/construct/partial_title.rs index 322a3e6..22c3209 100644 --- a/src/construct/partial_title.rs +++ b/src/construct/partial_title.rs @@ -173,7 +173,6 @@ fn title(tokenizer: &mut Tokenizer, code: Code, kind: Kind) -> StateFnResult { tokenizer.exit(TokenType::ChunkString); at_break(tokenizer, code, kind, true) } - // To do: limit blank lines. Code::CarriageReturnLineFeed | Code::Char('\r' | '\n') => { tokenizer.consume(code); tokenizer.exit(TokenType::ChunkString); diff --git a/src/content/flow.rs b/src/content/flow.rs index f4af4ea..481c8ff 100644 --- a/src/content/flow.rs +++ b/src/content/flow.rs @@ -94,7 +94,6 @@ fn blank_line_after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { fn initial_before(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { match code { Code::None => (State::Ok, None), - // To do: should all flow just start before the prefix? _ => tokenizer.attempt_7( code_indented, code_fenced, diff --git a/src/content/string.rs b/src/content/string.rs index efb6e60..c3e825e 100644 --- a/src/content/string.rs +++ b/src/content/string.rs @@ -17,8 +17,6 @@ use crate::construct::{ }; use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; -// To do: line endings? - /// Before string. /// /// ```markdown diff --git a/tests/html_flow.rs b/tests/html_flow.rs index 140e11d..53105a6 100644 --- a/tests/html_flow.rs +++ b/tests/html_flow.rs @@ -194,7 +194,7 @@ fn html_flow_2_comment() { "should support comments (type 2)" ); - // To do: phrasing. + // To do: attention. // assert_eq!( // micromark_with_options("<!-- foo -->*bar*\n*baz*", DANGER), // "<!-- foo -->*bar*\n<p><em>baz</em></p>", @@ -454,7 +454,7 @@ fn html_flow_5_cdata() { #[test] fn html_flow_6_basic() { - // To do: phrasing, paragraphs, etc. + // To do: attention. // assert_eq!( // micromark_with_options( // "<table><tr><td>\n<pre>\n**Hello**,\n\n_world_.\n</pre>\n</td></tr></table>", @@ -464,7 +464,6 @@ fn html_flow_6_basic() { // "should support html (basic)" // ); - // To do: paragraphs. assert_eq!( micromark_with_options( "<table> @@ -501,7 +500,7 @@ okay.", "should support html starting w/ a closing tag" ); - // To do: phrasing. + // To do: attention. // assert_eq!( // micromark_with_options("<DIV CLASS=\"foo\">\n\n*Markdown*\n\n</DIV>", DANGER), // "<DIV CLASS=\"foo\">\n<p><em>Markdown</em></p>\n</DIV>", @@ -520,7 +519,7 @@ okay.", "should support html w/ line endings (2)" ); - // To do: phrasing. + // To do: attention. // assert_eq!( // micromark_with_options("<div>\n*foo*\n\n*bar*", DANGER), // "<div>\n*foo*\n<p><em>bar</em></p>", @@ -601,7 +600,7 @@ okay.", "should require a blank line to end" ); - // To do: phrasing. + // To do: attention. // assert_eq!( // micromark_with_options("<div>\n\n*Emphasized* text.\n\n</div>", DANGER), // "<div>\n<p><em>Emphasized</em> text.</p>\n</div>", @@ -679,7 +678,7 @@ okay.", "should not support an eof directly after a self-closing slash" ); - // To do: phrasing. + // To do: attention. // assert_eq!( // micromark_with_options("<div/\n*asd*", DANGER), // "<p><div/\n<em>asd</em></p>", @@ -769,14 +768,14 @@ fn html_flow_7_complete() { "should support closing tags" ); - // To do: phrasing. + // To do: attention. // assert_eq!( // micromark_with_options("<del>\n\n*foo*\n\n</del>", DANGER), // "<del>\n<p><em>foo</em></p>\n</del>", // "should support interleaving" // ); - // To do: html (text). + // To do: attention. // assert_eq!( // micromark_with_options("<del>*foo*</del>", DANGER), // "<p><del><em>foo</em></del></p>", @@ -827,7 +826,7 @@ fn html_flow_7_complete() { "should not support an eof directly after a self-closing slash" ); - // To do: phrasing. + // To do: attention. // assert_eq!( // micromark_with_options("<x/\n*asd*", DANGER), // "<p><x/\n<em>asd</em></p>", @@ -846,19 +845,17 @@ fn html_flow_7_complete() { "should support a line ending after a self-closing tag" ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<x/>a", DANGER), - // "<p><x/>a</p>", - // "should not support another character after a self-closing tag" - // ); + assert_eq!( + micromark_with_options("<x/>a", DANGER), + "<p><x/>a</p>", + "should not support another character after a self-closing tag" + ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<x>a", DANGER), - // "<p><x>a</p>", - // "should not support another character after an opening tag" - // ); + assert_eq!( + micromark_with_options("<x>a", DANGER), + "<p><x>a</p>", + "should not support another character after an opening tag" + ); assert_eq!( micromark_with_options("<x y>", DANGER), @@ -866,32 +863,29 @@ fn html_flow_7_complete() { "should support boolean attributes in a complete tag" ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<x\ny>", DANGER), - // "<p><x\ny></p>", - // "should not support a line ending before an attribute name" - // ); + assert_eq!( + micromark_with_options("<x\ny>", DANGER), + "<p><x\ny></p>", + "should not support a line ending before an attribute name" + ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<x\n y>", DANGER), - // "<p><x\ny></p>", - // "should not support a line ending w/ whitespace before an attribute name" - // ); + assert_eq!( + micromark_with_options("<x\n y>", DANGER), + "<p><x\ny></p>", + "should not support a line ending w/ whitespace before an attribute name" + ); assert_eq!( - micromark_with_options("<x\n \ny>", DANGER), - "<p><x</p>\n<p>y></p>", - "should not support a line ending w/ whitespace and another line ending before an attribute name" - ); + micromark_with_options("<x\n \ny>", DANGER), + "<p><x</p>\n<p>y></p>", + "should not support a line ending w/ whitespace and another line ending before an attribute name" + ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<x y\nz>", DANGER), - // "<p><x y\nz></p>", - // "should not support a line ending between attribute names" - // ); + assert_eq!( + micromark_with_options("<x y\nz>", DANGER), + "<p><x y\nz></p>", + "should not support a line ending between attribute names" + ); assert_eq!( micromark_with_options("<x y z>", DANGER), @@ -995,26 +989,23 @@ fn html_flow_7_complete() { "should support an empty single quoted attribute value" ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<x y=\"\n\">", DANGER), - // "<p><x y=\"\n\"></p>", - // "should not support a line ending in a double quoted attribute value" - // ); + assert_eq!( + micromark_with_options("<x y=\"\n\">", DANGER), + "<p><x y=\"\n\"></p>", + "should not support a line ending in a double quoted attribute value" + ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<x y=\"\n\">", DANGER), - // "<p><x y=\"\n\"></p>", - // "should not support a line ending in a single quoted attribute value" - // ); + assert_eq!( + micromark_with_options("<x y=\"\n\">", DANGER), + "<p><x y=\"\n\"></p>", + "should not support a line ending in a single quoted attribute value" + ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<w x=y\nz>", DANGER), - // "<p><w x=y\nz></p>", - // "should not support a line ending in/after an unquoted attribute value" - // ); + assert_eq!( + micromark_with_options("<w x=y\nz>", DANGER), + "<p><w x=y\nz></p>", + "should not support a line ending in/after an unquoted attribute value" + ); assert_eq!( micromark_with_options("<w x=y\"z>", DANGER), @@ -1022,12 +1013,11 @@ fn html_flow_7_complete() { "should not support a double quote in/after an unquoted attribute value" ); - // To do: html (text). - // assert_eq!( - // micromark_with_options("<w x=y\"z>", DANGER), - // "<p><w x=y\"z></p>", - // "should not support a single quote in/after an unquoted attribute value" - // ); + assert_eq!( + micromark_with_options("<w x=y'z>", DANGER), + "<p><w x=y'z></p>", + "should not support a single quote in/after an unquoted attribute value" + ); assert_eq!( micromark_with_options("<x y=\"\"z>", DANGER), |