Merge pull request #515 from jridgewell/playpen-default
Implement playpen defaults
This commit is contained in:
commit
06c9d67e75
|
@ -274,12 +274,22 @@ pub struct HtmlConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Configuration for tweaking how the the HTML renderer handles the playpen.
|
/// Configuration for tweaking how the the HTML renderer handles the playpen.
|
||||||
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
|
#[serde(default, rename_all = "kebab-case")]
|
||||||
pub struct Playpen {
|
pub struct Playpen {
|
||||||
pub editor: PathBuf,
|
pub editor: PathBuf,
|
||||||
pub editable: bool,
|
pub editable: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Playpen {
|
||||||
|
fn default() -> Playpen {
|
||||||
|
Playpen {
|
||||||
|
editor: PathBuf::from("ace"),
|
||||||
|
editable: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
Loading…
Reference in New Issue