From 504729a4a0c8f3e0d8fc9159e0273150b169e184 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 12 Aug 2022 14:21:53 +0200 Subject: Refactor to improve docs of each function --- src/construct/html_text.rs | 60 +++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'src/construct/html_text.rs') diff --git a/src/construct/html_text.rs b/src/construct/html_text.rs index b92b9fa..fde78de 100644 --- a/src/construct/html_text.rs +++ b/src/construct/html_text.rs @@ -77,7 +77,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State { } } -/// After `<`, before a tag name or other stuff. +/// After `<`, at tag name or other stuff. /// /// ```markdown /// > | a c @@ -110,7 +110,7 @@ pub fn open(tokenizer: &mut Tokenizer) -> State { } } -/// After ` | a c @@ -139,7 +139,7 @@ pub fn declaration_open(tokenizer: &mut Tokenizer) -> State { } } -/// After ` | a c @@ -155,7 +155,7 @@ pub fn comment_open_inside(tokenizer: &mut Tokenizer) -> State { } } -/// After `` or `` as /// > empty comments. @@ -179,7 +179,7 @@ pub fn comment_start(tokenizer: &mut Tokenizer) -> State { } } -/// After `` or `` as /// > empty comments. @@ -199,7 +199,7 @@ pub fn comment_start_dash(tokenizer: &mut Tokenizer) -> State { } } -/// In a comment. +/// In comment. /// /// ```markdown /// > | a c @@ -223,7 +223,7 @@ pub fn comment(tokenizer: &mut Tokenizer) -> State { } } -/// In a comment, after `-`. +/// In comment, after `-`. /// /// ```markdown /// > | a c @@ -239,7 +239,7 @@ pub fn comment_close(tokenizer: &mut Tokenizer) -> State { } } -/// After ` | a &<]]> b @@ -285,7 +285,7 @@ pub fn cdata(tokenizer: &mut Tokenizer) -> State { } } -/// In CDATA, after `]`. +/// In CDATA, after `]`, at another `]`. /// /// ```markdown /// > | a &<]]> b @@ -301,7 +301,7 @@ pub fn cdata_close(tokenizer: &mut Tokenizer) -> State { } } -/// In CDATA, after `]]`. +/// In CDATA, after `]]`, at `>`. /// /// ```markdown /// > | a &<]]> b @@ -315,7 +315,7 @@ pub fn cdata_end(tokenizer: &mut Tokenizer) -> State { } } -/// In a declaration. +/// In declaration. /// /// ```markdown /// > | a c @@ -335,7 +335,7 @@ pub fn declaration(tokenizer: &mut Tokenizer) -> State { } } -/// In an instruction. +/// In instruction. /// /// ```markdown /// > | a c @@ -359,7 +359,7 @@ pub fn instruction(tokenizer: &mut Tokenizer) -> State { } } -/// In an instruction, after `?`. +/// In instruction, after `?`, at `>`. /// /// ```markdown /// > | a c @@ -372,7 +372,7 @@ pub fn instruction_close(tokenizer: &mut Tokenizer) -> State { } } -/// After ` | a c @@ -406,7 +406,7 @@ pub fn tag_close(tokenizer: &mut Tokenizer) -> State { } } -/// In a closing tag, after the tag name. +/// In closing tag, after tag name. /// /// ```markdown /// > | a c @@ -426,7 +426,7 @@ pub fn tag_close_between(tokenizer: &mut Tokenizer) -> State { } } -/// After ` | a c @@ -444,7 +444,7 @@ pub fn tag_open(tokenizer: &mut Tokenizer) -> State { } } -/// In an opening tag, after the tag name. +/// In opening tag, after tag name. /// /// ```markdown /// > | a c @@ -473,7 +473,7 @@ pub fn tag_open_between(tokenizer: &mut Tokenizer) -> State { } } -/// In an attribute name. +/// In attribute name. /// /// ```markdown /// > | a d @@ -490,8 +490,8 @@ pub fn tag_open_attribute_name(tokenizer: &mut Tokenizer) -> State { } } -/// After an attribute name, before an attribute initializer, the end of the -/// tag, or whitespace. +/// After attribute name, before initializer, the end of the tag, or +/// whitespace. /// /// ```markdown /// > | a d @@ -518,8 +518,8 @@ pub fn tag_open_attribute_name_after(tokenizer: &mut Tokenizer) -> State { } } -/// Before an unquoted, double quoted, or single quoted attribute value, -/// allowing whitespace. +/// Before unquoted, double quoted, or single quoted attribute value, allowing +/// whitespace. /// /// ```markdown /// > | a e @@ -551,7 +551,7 @@ pub fn tag_open_attribute_value_before(tokenizer: &mut Tokenizer) -> State { } } -/// In a double or single quoted attribute value. +/// In double or single quoted attribute value. /// /// ```markdown /// > | a e @@ -582,7 +582,7 @@ pub fn tag_open_attribute_value_quoted(tokenizer: &mut Tokenizer) -> State { } } -/// In an unquoted attribute value. +/// In unquoted attribute value. /// /// ```markdown /// > | a e @@ -599,8 +599,8 @@ pub fn tag_open_attribute_value_unquoted(tokenizer: &mut Tokenizer) -> State { } } -/// After a double or single quoted attribute value, before whitespace or the -/// end of the tag. +/// After double or single quoted attribute value, before whitespace or the end +/// of the tag. /// /// ```markdown /// > | a e @@ -613,7 +613,7 @@ pub fn tag_open_attribute_value_quoted_after(tokenizer: &mut Tokenizer) -> State } } -/// In certain circumstances of a complete tag where only an `>` is allowed. +/// In certain circumstances of a tag where only an `>` is allowed. /// /// ```markdown /// > | a e @@ -631,7 +631,7 @@ pub fn end(tokenizer: &mut Tokenizer) -> State { } } -/// At an allowed line ending. +/// At eol. /// /// > πŸ‘‰ **Note**: we can’t have blank lines in text, so no need to worry about /// > empty tokens. @@ -654,7 +654,7 @@ pub fn line_ending_before(tokenizer: &mut Tokenizer) -> State { } } -/// After a line ending. +/// After eol, at optional whitespace. /// /// > πŸ‘‰ **Note**: we can’t have blank lines in text, so no need to worry about /// > empty tokens. @@ -672,7 +672,7 @@ pub fn line_ending_after(tokenizer: &mut Tokenizer) -> State { State::Retry(space_or_tab(tokenizer)) } -/// After a line ending, after indent. +/// After eol, after optional whitespace. /// /// > πŸ‘‰ **Note**: we can’t have blank lines in text, so no need to worry about /// > empty tokens. -- cgit