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/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/parser.rs') diff --git a/src/parser.rs b/src/parser.rs index dc2c07a..a8416ed 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -4,10 +4,10 @@ use crate::content::document::document; use crate::event::{Event, Point}; use crate::{Constructs, Options}; -/// Information needed, in all content types, when parsing markdown. +/// Info needed, in all content types, when parsing markdown. /// /// Importantly, this contains a set of known definitions. -/// It also references the input value as a `Vec`. +/// It also references the input value as bytes (`u8`). #[derive(Debug)] pub struct ParseState<'a> { pub constructs: &'a Constructs, @@ -19,7 +19,7 @@ pub struct ParseState<'a> { /// Turn a string of markdown into events. /// -/// Passes the codes back so the compiler can access the source. +/// Passes the bytes back so the compiler can access the source. pub fn parse<'a>(value: &'a str, options: &'a Options) -> (Vec, &'a [u8]) { let mut parse_state = ParseState { constructs: &options.constructs, -- cgit