Revert "Add docs_preprocessor crate to support Zed Docs" (#16880)

Temporarily revert #16700 to deal with this error:

`error: manifest path `../crates/docs_preprocessor/Cargo.toml` does not
exist` as it was causing the docs-preprocessor not to run, meaning
unexpanded templates were showing up in the public docs.

Reverts zed-industries/zed#16700

Release Notes:

- N/A
This commit is contained in:
Nate Butler 2024-08-26 11:06:25 -04:00 committed by GitHub
parent c658ad8380
commit 2a03dde538
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 24 additions and 639 deletions

View file

@ -1,25 +0,0 @@
use crate::PreprocessorContext;
use regex::Regex;
use std::collections::HashMap;
mod action;
mod keybinding;
pub use action::*;
pub use keybinding::*;
pub trait Template {
fn key(&self) -> &'static str;
fn regex(&self) -> Regex;
fn parse_args(&self, args: &str) -> HashMap<String, String>;
fn render(&self, context: &PreprocessorContext, args: &HashMap<String, String>) -> String;
fn process(&self, context: &PreprocessorContext, content: &str) -> String {
self.regex()
.replace_all(content, |caps: &regex::Captures| {
let args = self.parse_args(&caps[1]);
self.render(context, &args)
})
.into_owned()
}
}