markdown-tool 2.1.1

A CLI utility for converting Markdown into AST and vice versa
1
2
3
4
5
6
7
8
9
10
11
12
13
use anyhow::Result;
use clap::Args;

#[derive(Args)]
pub struct ConvertToAstJson;

impl ConvertToAstJson {
    pub fn run(&self, ast: &markdown_ppp::ast::Document) -> Result<()> {
        let result = serde_json::to_string(ast)?;
        println!("{result}");
        Ok(())
    }
}