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:
parent
c658ad8380
commit
2a03dde538
16 changed files with 24 additions and 639 deletions
|
@ -22,34 +22,10 @@ pub struct KeymapBlock {
|
|||
bindings: BTreeMap<String, KeymapAction>,
|
||||
}
|
||||
|
||||
impl KeymapBlock {
|
||||
pub fn context(&self) -> Option<&str> {
|
||||
self.context.as_deref()
|
||||
}
|
||||
|
||||
pub fn bindings(&self) -> &BTreeMap<String, KeymapAction> {
|
||||
&self.bindings
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default, Clone)]
|
||||
#[serde(transparent)]
|
||||
pub struct KeymapAction(Value);
|
||||
|
||||
impl ToString for KeymapAction {
|
||||
fn to_string(&self) -> String {
|
||||
match &self.0 {
|
||||
Value::String(s) => s.clone(),
|
||||
Value::Array(arr) => arr
|
||||
.iter()
|
||||
.map(|v| v.to_string())
|
||||
.collect::<Vec<_>>()
|
||||
.join(", "),
|
||||
_ => self.0.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl JsonSchema for KeymapAction {
|
||||
fn schema_name() -> String {
|
||||
"KeymapAction".into()
|
||||
|
@ -159,10 +135,6 @@ impl KeymapFile {
|
|||
|
||||
serde_json::to_value(root_schema).unwrap()
|
||||
}
|
||||
|
||||
pub fn blocks(&self) -> &[KeymapBlock] {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
fn no_action() -> Box<dyn gpui::Action> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue