From b33a81e40620b8b3eaeeec9d0e0b34ca5958dead Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 28 Sep 2022 17:54:39 +0200 Subject: Add support for turning mdast to hast --- src/construct/heading_atx.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/construct/heading_atx.rs') diff --git a/src/construct/heading_atx.rs b/src/construct/heading_atx.rs index b76e455..c867117 100644 --- a/src/construct/heading_atx.rs +++ b/src/construct/heading_atx.rs @@ -69,7 +69,7 @@ use crate::state::{Name as StateName, State}; use crate::subtokenize::Subresult; use crate::tokenizer::Tokenizer; use crate::util::constant::{HEADING_ATX_OPENING_FENCE_SIZE_MAX, TAB_SIZE}; -use alloc::{string::String, vec}; +use alloc::vec; /// Start of a heading (atx). /// @@ -223,7 +223,7 @@ pub fn data(tokenizer: &mut Tokenizer) -> State { } /// Resolve heading (atx). -pub fn resolve(tokenizer: &mut Tokenizer) -> Result, String> { +pub fn resolve(tokenizer: &mut Tokenizer) -> Option { let mut index = 0; let mut heading_inside = false; let mut data_start: Option = None; @@ -283,5 +283,5 @@ pub fn resolve(tokenizer: &mut Tokenizer) -> Result, String> { index += 1; } - Ok(None) + None } -- cgit