Add rendering of rule markdown for terminal output (#2747)

Add rendering of rule markdown for terminal output
    
This is achieved by making use of the `mdcat` crate.
    
See the following links for details:
    
- https://crates.io/crates/mdcat
- https://github.com/swsnr/mdcat
- https://docs.rs/mdcat/latest/mdcat/
This commit is contained in:
Nick Pope 2023-02-12 02:32:45 +00:00 committed by GitHub
parent 1b61d4e18b
commit 551b810aeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 922 additions and 49 deletions

View file

@ -40,7 +40,7 @@ pub fn main(args: &Args) -> Result<()> {
output.push_str(explanation.trim());
if args.dry_run {
println!("{}", output);
println!("{output}");
} else {
fs::create_dir_all("docs/rules")?;
fs::write(format!("docs/rules/{}.md", rule.as_ref()), output)?;