Function gutenberg_post_parser::parser::block_attributes[]

pub fn block_attributes<'a>(i: &'a [u8]) -> IResult<&[u8], &[u8], u32>

Recognize block attributes.

Examples

extern crate gutenberg_post_parser;

use gutenberg_post_parser::parser::block_attributes;

let input = &b"{\"foo\": \"bar\"}-->"[..];
let output = Ok(
    (
        // The remaining data.
        &b"-->"[..],

        // The parsed data.
        &b"{\"foo\": \"bar\"}"[..]
    )
);

assert_eq!(block_attributes(input), output);