feat(cph): add outline export command

This commit is contained in:
2026-08-05 16:34:02 +08:00
committed by 洪佳荣
parent 9927d38c18
commit fe8a17c6ad
15 changed files with 635 additions and 56 deletions
+2 -1
View File
@@ -157,7 +157,7 @@ fn outline_entry_table(
) -> toml::Table {
let mut e = toml::Table::new();
match entry {
OutlineEntry::Element { part_index } => {
OutlineEntry::Element { part_index, .. } => {
let part = &lesson.parts[*part_index];
e.insert("type".to_string(), toml::Value::String("element".into()));
e.insert("kind".to_string(), toml::Value::String(part.kind.clone()));
@@ -176,6 +176,7 @@ fn outline_entry_table(
title,
depth,
path,
notes: _,
} => {
e.insert("type".to_string(), toml::Value::String("section".into()));
e.insert("kind".to_string(), toml::Value::String(kind.clone()));