Basic Link Parsing In Rust's nom Crate
This is the start of the code I'm using to parse out links for Neopolitan. Next up is to send info about the type along with the code that gets returned to allow for further processing.
Code
use alt;
use tag;
use take_until;
use eof;
use rest;
use many_till;
use delimited;
use IResult;
Results
[src/bin/nom_examples.rs:22] &source = "some <<link|example|https://www.example.com/>> link"
[src/bin/nom_examples.rs:22] &source = "<<link|example|https://www.example.com/>> link"
[src/bin/nom_examples.rs:22] &source = " link"
[src/bin/nom_examples.rs:13] parts = [
"some ",
"link|example|https://www.example.com/",
" link",
]