diff --git a/Cargo.lock b/Cargo.lock index 9a5e60d7..9019dff2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,12 +111,6 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "ascii" version = "1.1.0" @@ -157,12 +151,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" - [[package]] name = "bincode" version = "1.3.3" @@ -193,18 +181,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "0.19.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "block-buffer" version = "0.10.4" @@ -230,12 +206,6 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" -[[package]] -name = "bytecount" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" - [[package]] name = "cc" version = "1.0.79" @@ -258,7 +228,6 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "serde", "time 0.1.45", "wasm-bindgen", "winapi", @@ -338,6 +307,7 @@ version = "0.18.5" dependencies = [ "anstream", "anyhow", + "chrono", "clap", "clap-verbosity-flag", "cobalt-config", @@ -378,7 +348,6 @@ dependencies = [ "time 0.3.21", "toml", "trycmd", - "vimwiki", "walkdir", "yansi", ] @@ -440,12 +409,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation-sys" version = "0.8.4" @@ -529,38 +492,14 @@ dependencies = [ "typenum", ] -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - [[package]] name = "darling" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -577,24 +516,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core 0.13.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core 0.14.4", + "darling_core", "quote", "syn 1.0.109", ] @@ -614,7 +542,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ - "darling 0.14.4", + "darling", "proc-macro2", "quote", "syn 1.0.109", @@ -630,18 +558,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "deunicode" version = "1.3.3" @@ -667,35 +583,6 @@ dependencies = [ "chrono", ] -[[package]] -name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "doc-comment" version = "0.3.3" @@ -739,7 +626,7 @@ dependencies = [ name = "engarde" version = "0.1.6" dependencies = [ - "syntect 5.0.0", + "syntect", ] [[package]] @@ -872,12 +759,6 @@ dependencies = [ "libc", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "generic-array" version = "0.14.7" @@ -1219,40 +1100,12 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "libc" version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -1411,19 +1264,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c96aba5aa877601bb3f6dd6a63a969e1f82e60646e81e71b14496995e9853c91" -[[package]] -name = "nom" -version = "6.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" -dependencies = [ - "bitvec", - "funty", - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "normalize-line-endings" version = "0.3.0" @@ -1487,12 +1327,6 @@ dependencies = [ "libc", ] -[[package]] -name = "numerals" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25be21376a772d15f97ae789845340a9651d3c4246ff5ebb6a2b35f9c37bd31" - [[package]] name = "object" version = "0.30.3" @@ -1601,20 +1435,6 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "plist" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" -dependencies = [ - "base64", - "indexmap", - "line-wrap", - "quick-xml", - "serde", - "time 0.3.21", -] - [[package]] name = "proc-exit" version = "2.0.1" @@ -1660,12 +1480,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - [[package]] name = "rayon" version = "1.7.0" @@ -1706,17 +1520,6 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", -] - [[package]] name = "regex" version = "1.8.3" @@ -1787,12 +1590,6 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -1876,28 +1673,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_with" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" -dependencies = [ - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling 0.13.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "serde_yaml" version = "0.9.21" @@ -1922,15 +1697,6 @@ dependencies = [ "digest", ] -[[package]] -name = "shellexpand" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" -dependencies = [ - "dirs 4.0.0", -] - [[package]] name = "shlex" version = "1.1.0" @@ -2001,16 +1767,6 @@ dependencies = [ "indexmap", ] -[[package]] -name = "stfu8" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1310970b29733b601839578f8ba24991a97057dbedc4ac0decea835474054ee7" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "strsim" version = "0.10.0" @@ -2039,28 +1795,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "syntect" -version = "4.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b20815bbe80ee0be06e6957450a841185fcf690fe0178f14d77a05ce2caa031" -dependencies = [ - "bincode", - "bitflags", - "fancy-regex", - "flate2", - "fnv", - "lazy_static", - "lazycell", - "plist", - "regex-syntax 0.6.29", - "serde", - "serde_derive", - "serde_json", - "walkdir", - "yaml-rust", -] - [[package]] name = "syntect" version = "5.0.0" @@ -2083,12 +1817,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" version = "3.5.0" @@ -2320,17 +2048,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" -[[package]] -name = "uriparse" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" -dependencies = [ - "fnv", - "lazy_static", - "serde", -] - [[package]] name = "url" version = "2.3.1" @@ -2369,50 +2086,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "vimwiki" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924549c10a8247bd3adc80306d179e3aa64f8bb29fa2cfd371ab8081ba87a102" -dependencies = [ - "vimwiki-core", -] - -[[package]] -name = "vimwiki-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658d73f1dab1fc4422ee866421ecfba9a82037191f5df632ffaf4f05ea807ec6" -dependencies = [ - "bytecount", - "chrono", - "derive_more", - "dirs 3.0.2", - "lazy_static", - "memchr", - "nom", - "numerals", - "percent-encoding", - "relative-path", - "serde", - "serde_with", - "shellexpand", - "syntect 4.6.0", - "uriparse", - "voca_rs", -] - -[[package]] -name = "voca_rs" -version = "1.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e44efbf25e32768d5ecd22244feacc3d3b3eca72d318f5ef0a4764c2c158e18" -dependencies = [ - "regex", - "stfu8", - "unicode-segmentation", -] - [[package]] name = "wait-timeout" version = "0.2.0" @@ -2679,12 +2352,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "xml-rs" version = "0.8.14" diff --git a/Cargo.toml b/Cargo.toml index bf7b07cf..42b04306 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,7 +96,6 @@ normalize-line-endings = "0.3.0" sitemap = "0.4" open = "4" dunce = "1.0.4" -vimwiki = { version = "0.1", features = ["html"] } file-serve = { version = "0.2.3", path = "crates/file-serve", optional = true } notify = { version = "6", optional = true, default-features = false, features = ["macos_fsevent"] } @@ -106,6 +105,7 @@ sass-rs = { version = "0.2", optional = true } html-minifier = {version="3.0", optional = true } anyhow = "1.0.71" anstream = "0.3.2" +chrono = "0.4.26" [dev-dependencies] trycmd = "0.14" diff --git a/crates/config/src/frontmatter.rs b/crates/config/src/frontmatter.rs index 62a27d0c..38fb462c 100644 --- a/crates/config/src/frontmatter.rs +++ b/crates/config/src/frontmatter.rs @@ -65,7 +65,6 @@ impl Frontmatter { let format = match split_name.1 { Some("md") => SourceFormat::Markdown, - Some("wiki") => SourceFormat::Vimwiki, _ => SourceFormat::Raw, }; self.format.get_or_insert(format); @@ -284,7 +283,6 @@ pub enum SourceFormat { #[default] Raw, Markdown, - Vimwiki, #[cfg(not(feature = "unstable"))] #[doc(hidden)] #[serde(other)] diff --git a/src/cobalt.rs b/src/cobalt.rs index 88a92ff9..0eaad753 100644 --- a/src/cobalt.rs +++ b/src/cobalt.rs @@ -31,7 +31,6 @@ struct Context { pub layouts: HashMap, pub liquid: cobalt_model::Liquid, pub markdown: cobalt_model::Markdown, - pub vimwiki: cobalt_model::Vimwiki, pub assets: cobalt_model::Assets, pub minify: Minify, } @@ -50,7 +49,6 @@ impl Context { layouts_path, liquid, markdown, - vimwiki, syntax: _, assets, minify, @@ -60,7 +58,6 @@ impl Context { let site_attributes = site.load(&source)?; let liquid = liquid.build()?; let markdown = markdown.build(); - let vimwiki = vimwiki.build(); let assets = assets.build()?; let layouts = find_layouts(&layouts_path)?; @@ -78,7 +75,6 @@ impl Context { layouts, liquid, markdown, - vimwiki, assets, minify, }; @@ -205,7 +201,6 @@ fn generate_doc( let render_context = RenderContext { parser: &context.liquid, markdown: &context.markdown, - vimwiki: &context.vimwiki, globals: &globals, minify: context.minify.clone(), }; @@ -226,7 +221,6 @@ fn generate_doc( let render_context = RenderContext { parser: &context.liquid, markdown: &context.markdown, - vimwiki: &context.vimwiki, globals: &globals, minify: context.minify.clone(), }; diff --git a/src/cobalt_model/config.rs b/src/cobalt_model/config.rs index a8247450..3d72ec41 100644 --- a/src/cobalt_model/config.rs +++ b/src/cobalt_model/config.rs @@ -12,7 +12,6 @@ use super::collection; use super::mark; use super::site; use super::template; -use super::vwiki; use crate::SyntaxHighlight; #[derive(Debug, Clone, Serialize)] @@ -29,7 +28,6 @@ pub struct Config { pub layouts_path: path::PathBuf, pub liquid: template::LiquidBuilder, pub markdown: mark::MarkdownBuilder, - pub vimwiki: vwiki::VimwikiBuilder, #[serde(skip)] pub syntax: std::sync::Arc, pub assets: assets::AssetsBuilder, @@ -120,10 +118,6 @@ impl Config { .enabled .then(|| syntax_highlight.theme.clone()), }; - let vimwiki = vwiki::VimwikiBuilder { - theme: syntax_highlight.theme, - syntax_highlight_enabled: syntax_highlight.enabled, - }; let config = Config { source, @@ -137,7 +131,6 @@ impl Config { layouts_path, liquid, markdown, - vimwiki, syntax, assets, minify, diff --git a/src/cobalt_model/mod.rs b/src/cobalt_model/mod.rs index ed28dfa8..e9577dcb 100644 --- a/src/cobalt_model/mod.rs +++ b/src/cobalt_model/mod.rs @@ -6,7 +6,6 @@ mod mark; mod sass; mod site; mod template; -mod vwiki; pub mod files; pub mod pagination; @@ -33,5 +32,3 @@ pub use self::sass::SassCompiler; pub use self::site::Site; pub use self::template::Liquid; pub use self::template::LiquidBuilder; -pub use self::vwiki::Vimwiki; -pub use self::vwiki::VimwikiBuilder; diff --git a/src/cobalt_model/vwiki.rs b/src/cobalt_model/vwiki.rs deleted file mode 100644 index a2a061a0..00000000 --- a/src/cobalt_model/vwiki.rs +++ /dev/null @@ -1,52 +0,0 @@ -use crate::error::*; -use serde::{Deserialize, Serialize}; -use vimwiki::{HtmlCodeConfig, HtmlConfig, Language, Page, ParseError, ToHtmlString}; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -#[serde(deny_unknown_fields)] -pub struct VimwikiBuilder { - pub theme: liquid::model::KString, - pub syntax_highlight_enabled: bool, -} - -impl VimwikiBuilder { - pub fn build(self) -> Vimwiki { - Vimwiki { - theme: self.theme, - syntax_highlight_enabled: self.syntax_highlight_enabled, - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Vimwiki { - theme: liquid::model::KString, - syntax_highlight_enabled: bool, -} - -impl Vimwiki { - pub fn parse(&self, content: &str) -> Result { - let lang = Language::from_vimwiki_str(content); - - // TODO: vimwiki crate needs to support converting ParseError<'a> - // into owned version of ParseError<'static> similar to elements - // - // Until then, we just convert to error display message and - // wrap that in a general failure error type - let page: Page<'_> = lang - .parse() - .map_err(|x: ParseError<'_>| anyhow::format_err!("vimwiki parsing failed: {}", x))?; - - let config = HtmlConfig { - code: HtmlCodeConfig { - theme: self.theme.as_str().to_owned(), - server_side: self.syntax_highlight_enabled, - ..Default::default() - }, - ..Default::default() - }; - - let s = page.to_html_string(config)?; - Ok(s) - } -} diff --git a/src/document.rs b/src/document.rs index 549251b1..e1f46b33 100644 --- a/src/document.rs +++ b/src/document.rs @@ -21,7 +21,6 @@ use crate::error::*; pub struct RenderContext<'a> { pub parser: &'a cobalt_model::Liquid, pub markdown: &'a cobalt_model::Markdown, - pub vimwiki: &'a cobalt_model::Vimwiki, pub globals: &'a Object, pub minify: Minify, } @@ -272,7 +271,7 @@ impl Document { let mut url = sitemap::structs::UrlEntry::builder(); url = url.loc(link); if let Some(date) = self.front.published_date { - let date = vimwiki::vendor::chrono::DateTime::parse_from_rfc2822(&date.to_rfc2822()) + let date = chrono::DateTime::parse_from_rfc2822(&date.to_rfc2822()) .expect("chrono/time compatible RFC 2822 implementations"); url = url.lastmod(date); } @@ -317,7 +316,6 @@ impl Document { let html = match self.front.format { cobalt_model::SourceFormat::Raw => html, cobalt_model::SourceFormat::Markdown => context.markdown.parse(&html)?, - cobalt_model::SourceFormat::Vimwiki => context.vimwiki.parse(&html)?, }; Ok(html) @@ -436,8 +434,6 @@ fn extract_excerpt( cobalt_model::SourceFormat::Markdown => { extract_excerpt_markdown(content, excerpt_separator) } - cobalt_model::SourceFormat::Vimwiki | cobalt_model::SourceFormat::Raw => { - extract_excerpt_raw(content, excerpt_separator) - } + cobalt_model::SourceFormat::Raw => extract_excerpt_raw(content, excerpt_separator), } } diff --git a/tests/cmd/vimwiki_not_templated.in/_cobalt.yml b/tests/cmd/vimwiki_not_templated.in/_cobalt.yml deleted file mode 100644 index 09fd4be0..00000000 --- a/tests/cmd/vimwiki_not_templated.in/_cobalt.yml +++ /dev/null @@ -1,3 +0,0 @@ -syntax_highlight: - theme: "base16-ocean.dark" - enabled: true diff --git a/tests/cmd/vimwiki_not_templated.in/_layouts/default.liquid b/tests/cmd/vimwiki_not_templated.in/_layouts/default.liquid deleted file mode 100644 index db610e79..00000000 --- a/tests/cmd/vimwiki_not_templated.in/_layouts/default.liquid +++ /dev/null @@ -1,11 +0,0 @@ - - - - test - - -

{{ page.permalink }}

- - {{ page.content }} - - diff --git a/tests/cmd/vimwiki_not_templated.in/index.wiki b/tests/cmd/vimwiki_not_templated.in/index.wiki deleted file mode 100644 index 723abd8c..00000000 --- a/tests/cmd/vimwiki_not_templated.in/index.wiki +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: default.liquid -templated: false ---- - -= header 1 = - -some paragraph of text with *bold* text, _italic_ text, ^super^ text, -,,sub,, text, `code` text, $math$ text, TODO keywords, and [[links]]. - -== header 2 == - -{{{python -def my_func(): - print('hello world!') -}}} - -| test | test | -|------|------| -| 12 | 123 | - - -| Header 1 | Header 2 | -|----------|----------| -| data 1 | data 2 | diff --git a/tests/cmd/vimwiki_not_templated.md b/tests/cmd/vimwiki_not_templated.md deleted file mode 100644 index c4fc4677..00000000 --- a/tests/cmd/vimwiki_not_templated.md +++ /dev/null @@ -1,15 +0,0 @@ -```console -$ cobalt -v build --destination _dest -DEBUG: Using config file `[CWD]/_cobalt.yml` -Building from `[CWD]` into `[CWD]/_dest` -DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) } -DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) } -DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes -DEBUG: Loading data from `[CWD]/_data` -DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) } -DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) } -DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes -DEBUG: Loading snippets from `[CWD]/_includes` -Build successful - -``` diff --git a/tests/cmd/vimwiki_not_templated.out/_dest/index.html b/tests/cmd/vimwiki_not_templated.out/_dest/index.html deleted file mode 100644 index f7ec674d..00000000 --- a/tests/cmd/vimwiki_not_templated.out/_dest/index.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - test - - -

index.html

- -

header 1

-

some paragraph of text with bold text, italic text, super text, sub text, code text, /(math/) text, TODO keywords, and links.

- -
-def my_func():
-    print('hello world!')
-
- - - - - - - - - - - - - -
test test
12 123
- - - - - - - - - - - - - -
Header 1 Header 2
data 1 data 2
- - - diff --git a/tests/cmd/vimwiki_not_templated_no_syntax.in/_cobalt.yml b/tests/cmd/vimwiki_not_templated_no_syntax.in/_cobalt.yml deleted file mode 100644 index 6c2e9195..00000000 --- a/tests/cmd/vimwiki_not_templated_no_syntax.in/_cobalt.yml +++ /dev/null @@ -1,2 +0,0 @@ -syntax_highlight: - enabled: false diff --git a/tests/cmd/vimwiki_not_templated_no_syntax.in/_layouts/default.liquid b/tests/cmd/vimwiki_not_templated_no_syntax.in/_layouts/default.liquid deleted file mode 100644 index db610e79..00000000 --- a/tests/cmd/vimwiki_not_templated_no_syntax.in/_layouts/default.liquid +++ /dev/null @@ -1,11 +0,0 @@ - - - - test - - -

{{ page.permalink }}

- - {{ page.content }} - - diff --git a/tests/cmd/vimwiki_not_templated_no_syntax.in/index.wiki b/tests/cmd/vimwiki_not_templated_no_syntax.in/index.wiki deleted file mode 100644 index 723abd8c..00000000 --- a/tests/cmd/vimwiki_not_templated_no_syntax.in/index.wiki +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: default.liquid -templated: false ---- - -= header 1 = - -some paragraph of text with *bold* text, _italic_ text, ^super^ text, -,,sub,, text, `code` text, $math$ text, TODO keywords, and [[links]]. - -== header 2 == - -{{{python -def my_func(): - print('hello world!') -}}} - -| test | test | -|------|------| -| 12 | 123 | - - -| Header 1 | Header 2 | -|----------|----------| -| data 1 | data 2 | diff --git a/tests/cmd/vimwiki_not_templated_no_syntax.md b/tests/cmd/vimwiki_not_templated_no_syntax.md deleted file mode 100644 index c4fc4677..00000000 --- a/tests/cmd/vimwiki_not_templated_no_syntax.md +++ /dev/null @@ -1,15 +0,0 @@ -```console -$ cobalt -v build --destination _dest -DEBUG: Using config file `[CWD]/_cobalt.yml` -Building from `[CWD]` into `[CWD]/_dest` -DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) } -DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) } -DEBUG: built glob set; 6 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes -DEBUG: Loading data from `[CWD]/_data` -DEBUG: glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)//.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) } -DEBUG: glob converted to regex: Glob { glob: "**/_*", re: "(?-u)^(?:/?|.*/)_[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('_'), ZeroOrMore]) } -DEBUG: built glob set; 0 literals, 0 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 2 regexes -DEBUG: Loading snippets from `[CWD]/_includes` -Build successful - -``` diff --git a/tests/cmd/vimwiki_not_templated_no_syntax.out/_dest/index.html b/tests/cmd/vimwiki_not_templated_no_syntax.out/_dest/index.html deleted file mode 100644 index 515e4964..00000000 --- a/tests/cmd/vimwiki_not_templated_no_syntax.out/_dest/index.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - test - - -

index.html

- -

header 1

-

some paragraph of text with bold text, italic text, super text, sub text, code text, /(math/) text, TODO keywords, and links.

- -
def my_func():
-    print('hello world!')
- - - - - - - - - - - - - -
test test
12 123
- - - - - - - - - - - - - -
Header 1 Header 2
data 1 data 2
- - -