cargo-sync-rdme 0.8.0

Cargo subcommand to synchronize README with crate documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use pulldown_cmark::Event;

use crate::sync::marker;

pub(super) fn convert<'a, I>(events: I) -> impl Iterator<Item = Event<'a>>
where
    I: IntoIterator<Item = Event<'a>>,
{
    events.into_iter().map(|event| {
        let mut event = event;
        marker::escape_marker(&mut event);
        event
    })
}