Blank function definitions (unimplemented) for the markdown link parser using nom
This commit is contained in:
parent
5350d62591
commit
fb648ef61e
|
@ -19,6 +19,7 @@ clap = "2.2.1"
|
|||
handlebars = "0.20.0"
|
||||
rustc-serialize = "0.3.18"
|
||||
pulldown-cmark = "0.0.8"
|
||||
nom = "1.2.3"
|
||||
|
||||
# Watch feature
|
||||
notify = { version = "2.5.5", optional = true }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
pub use self::summary::construct_bookitems;
|
||||
|
||||
pub mod summary;
|
||||
pub mod nom;
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
extern crate nom;
|
||||
|
||||
use self::nom::IResult;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
struct Link {
|
||||
title: String,
|
||||
destination: String,
|
||||
}
|
||||
|
||||
/// Parser for markdown links: `[title](destination)`
|
||||
/// From the Common Mark spec:
|
||||
///
|
||||
/// Brackets are allowed in the link text only if
|
||||
/// (a) they are backslash-escaped or
|
||||
/// (b) they appear as a matched pair of brackets,
|
||||
/// with an open bracket [, a sequence of zero or more inlines, and a close bracket ].
|
||||
///
|
||||
fn link(i: &[u8]) -> IResult<&[u8], Link> {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
/// Parser for parsing the title part of the link: [title](destination)
|
||||
/// ^^^^^^^
|
||||
fn link_text(i: &[u8]) -> IResult<&[u8], String> {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
fn link_destination(i: &[u8]) -> IResult<&[u8], String> {
|
||||
unimplemented!();
|
||||
}
|
Loading…
Reference in New Issue