diff --git a/lib/core/herocmds/atlas.v b/lib/core/herocmds/atlas.v index 81b0b953..427c348d 100644 --- a/lib/core/herocmds/atlas.v +++ b/lib/core/herocmds/atlas.v @@ -147,8 +147,6 @@ fn cmd_atlas_execute(cmd Command) ! { console.print_header('Running Atlas for: ${atlas_path.path}') // Run HeroScript if exists - // Note: emptycheck is false because !!include actions in markdown files - // are processed internally by atlas during export, not through the playbook system playcmds.run( heroscript_path: atlas_path.path reset: false @@ -163,7 +161,6 @@ fn cmd_atlas_execute(cmd Command) ! { } // Default behavior: scan and export if no flags specified - // Also enable scan and export if dev is requested if !scan && !export { scan = true export = true diff --git a/lib/data/atlas/atlas.v b/lib/data/atlas/atlas.v index ad32e63e..fa3f41a4 100644 --- a/lib/data/atlas/atlas.v +++ b/lib/data/atlas/atlas.v @@ -24,7 +24,7 @@ fn (mut self Atlas) add_collection(mut path pathlib.Path) !Collection { name = params.get('name')! } } - // Normalize collection name + name = texttools.name_fix(name) console.print_item("Adding collection '${name}' to Atlas '${self.name}' at path '${path.path}'") diff --git a/lib/data/atlas/collection.v b/lib/data/atlas/collection.v index 1ab6bd5c..b25367d2 100644 --- a/lib/data/atlas/collection.v +++ b/lib/data/atlas/collection.v @@ -49,7 +49,6 @@ fn (mut c Collection) init_post() ! { // Add a page to the collection fn (mut c Collection) add_page(mut path pathlib.Path) ! { - // Use name_fix_no_ext to normalize the name name := path.name_fix_no_ext() if name in c.pages { return error('Page ${name} already exists in collection ${c.name}') diff --git a/lib/data/atlas/link.v b/lib/data/atlas/link.v index 083e593d..04e9d52c 100644 --- a/lib/data/atlas/link.v +++ b/lib/data/atlas/link.v @@ -154,7 +154,6 @@ fn (mut p Page) parse_link_target(mut link Link) { if target.contains(':') { parts := target.split(':') if parts.len >= 2 { - // Normalize collection name link.target_collection_name = texttools.name_fix(parts[0]) link.target_item_name = normalize_page_name(parts[1]) } @@ -272,12 +271,11 @@ fn (mut p Page) process_links(mut export_dir pathlib.Path) !string { /////////////TOOLS////////////////////////////////// -// Normalize page name (remove .md and apply name_fix) +// Normalize page name (remove .md, apply name_fix) fn normalize_page_name(name string) string { mut clean := name if clean.ends_with('.md') { clean = clean[0..clean.len - 3] } - // Use name_fix to normalize return texttools.name_fix(clean) }