aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 613b206..23afb37 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -20,7 +20,7 @@ pub struct ParseState<'a> {
/// Turn a string of markdown into events.
///
/// Passes the codes back so the compiler can access the source.
-pub fn parse<'a>(value: &'a str, options: &'a Options) -> (Vec<Event>, ParseState<'a>) {
+pub fn parse<'a>(value: &'a str, options: &'a Options) -> (Vec<Event>, &'a [u8]) {
let mut parse_state = ParseState {
constructs: &options.constructs,
bytes: value.as_bytes(),
@@ -37,6 +37,5 @@ pub fn parse<'a>(value: &'a str, options: &'a Options) -> (Vec<Event>, ParseStat
},
);
- // To do: return bytes only?
- (events, parse_state)
+ (events, parse_state.bytes)
}