From 2d35cbfceace81a217cd0fbdae7a8777c7a6465e Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 11 Aug 2022 13:31:20 +0200 Subject: Refactor internal docs, code style of tokenizer --- src/construct/definition.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/construct/definition.rs') diff --git a/src/construct/definition.rs b/src/construct/definition.rs index 62d0f3b..5db611b 100644 --- a/src/construct/definition.rs +++ b/src/construct/definition.rs @@ -174,7 +174,12 @@ pub fn label_after(tokenizer: &mut Tokenizer) -> State { } } -/// To do. +/// After the marker. +/// +/// ```markdown +/// > | [a]: b "c" +/// ^ +/// ``` pub fn marker_after(tokenizer: &mut Tokenizer) -> State { let name = space_or_tab_eol(tokenizer); tokenizer.attempt( @@ -196,7 +201,7 @@ pub fn destination_before(tokenizer: &mut Tokenizer) -> State { tokenizer.tokenize_state.token_3 = Token::DefinitionDestinationLiteralMarker; tokenizer.tokenize_state.token_4 = Token::DefinitionDestinationRaw; tokenizer.tokenize_state.token_5 = Token::DefinitionDestinationString; - tokenizer.tokenize_state.size_other = usize::MAX; + tokenizer.tokenize_state.size_b = usize::MAX; tokenizer.attempt( StateName::DestinationStart, State::Next(StateName::DefinitionDestinationAfter), @@ -216,7 +221,7 @@ pub fn destination_after(tokenizer: &mut Tokenizer) -> State { tokenizer.tokenize_state.token_3 = Token::Data; tokenizer.tokenize_state.token_4 = Token::Data; tokenizer.tokenize_state.token_5 = Token::Data; - tokenizer.tokenize_state.size_other = 0; + tokenizer.tokenize_state.size_b = 0; tokenizer.attempt( StateName::DefinitionTitleBefore, State::Next(StateName::DefinitionAfter), @@ -231,7 +236,7 @@ pub fn destination_missing(tokenizer: &mut Tokenizer) -> State { tokenizer.tokenize_state.token_3 = Token::Data; tokenizer.tokenize_state.token_4 = Token::Data; tokenizer.tokenize_state.token_5 = Token::Data; - tokenizer.tokenize_state.size_other = 0; + tokenizer.tokenize_state.size_b = 0; State::Nok } -- cgit