From 9b74d6d45753990e8570fb3d9e2da9be4e54b764 Mon Sep 17 00:00:00 2001 From: kmaasrud Date: Fri, 24 Sep 2021 10:56:03 +0200 Subject: [PATCH] Moved katex to within mdzk crate --- Cargo.lock | 8 -------- Cargo.toml | 2 -- preprocessors/mdbook-katex/Cargo.toml | 10 ---------- preprocessors/mdbook-katex/src/lib.rs => src/katex.rs | 0 src/lib.rs | 1 + src/zk.rs | 2 +- 6 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 preprocessors/mdbook-katex/Cargo.toml rename preprocessors/mdbook-katex/src/lib.rs => src/katex.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index f3f6b40a..1d9fce60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -952,13 +952,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "mdbook-katex" -version = "0.1.1" -dependencies = [ - "mdbook", -] - [[package]] name = "mdbook-readme" version = "0.0.3" @@ -1002,7 +995,6 @@ dependencies = [ "mdbook", "mdbook-backlinks", "mdbook-frontmatter", - "mdbook-katex", "mdbook-readme", "mdbook-wikilinks", "notify", diff --git a/Cargo.toml b/Cargo.toml index ddd929bc..926a3a29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,6 @@ members = [ "preprocessors/mdbook-wikilinks", "preprocessors/mdbook-frontmatter", "preprocessors/mdbook-readme", - "preprocessors/mdbook-katex", ] [dependencies] @@ -54,7 +53,6 @@ structopt = "0.3.23" toml = "0.5.8" # Preprocessors -mdbook-katex = { path = "preprocessors/mdbook-katex", version = "0.1.1" } mdbook-backlinks = { path = "preprocessors/mdbook-backlinks", version = "0.2.6" } mdbook-frontmatter = { path = "preprocessors/mdbook-frontmatter", version = "0.0.3" } mdbook-readme = { path = "preprocessors/mdbook-readme", version = "0.0.3" } diff --git a/preprocessors/mdbook-katex/Cargo.toml b/preprocessors/mdbook-katex/Cargo.toml deleted file mode 100644 index 7e343c09..00000000 --- a/preprocessors/mdbook-katex/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -name = "mdbook-katex" -authors = [ - "Knut Magnus Aasrud " -] -version = "0.1.1" -edition = "2018" - -[dependencies] -mdbook = "0.4.12" diff --git a/preprocessors/mdbook-katex/src/lib.rs b/src/katex.rs similarity index 100% rename from preprocessors/mdbook-katex/src/lib.rs rename to src/katex.rs diff --git a/src/lib.rs b/src/lib.rs index 52ed4447..a64cb84c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,7 @@ extern crate log; pub mod cmd; pub mod config; +pub mod katex; pub mod renderer; pub mod utils; pub mod zk; diff --git a/src/zk.rs b/src/zk.rs index 9be5f70c..0d92c126 100644 --- a/src/zk.rs +++ b/src/zk.rs @@ -7,7 +7,7 @@ use anyhow::Context; use mdbook::{book::parse_summary, errors::*, MDBook}; use mdbook_backlinks::Backlinks; use mdbook_frontmatter::FrontMatter; -use mdbook_katex::Katex; +use crate::katex::Katex; use mdbook_readme::ReadmePreprocessor; use mdbook_wikilinks::WikiLinks; use std::fs::File;