Skip to content

Commit 06c9d67

Browse files
Merge pull request #515 from jridgewell/playpen-default
Implement playpen defaults
2 parents 65acb35 + 61356ce commit 06c9d67

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/config.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,22 @@ pub struct HtmlConfig {
274274
}
275275

276276
/// Configuration for tweaking how the the HTML renderer handles the playpen.
277-
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
277+
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
278+
#[serde(default, rename_all = "kebab-case")]
278279
pub struct Playpen {
279280
pub editor: PathBuf,
280281
pub editable: bool,
281282
}
282283

284+
impl Default for Playpen {
285+
fn default() -> Playpen {
286+
Playpen {
287+
editor: PathBuf::from("ace"),
288+
editable: false,
289+
}
290+
}
291+
}
292+
283293

284294
#[cfg(test)]
285295
mod tests {

0 commit comments

Comments
 (0)