added fmt and defer

This commit is contained in:
Simon Kellet
2026-06-22 23:46:06 +01:00
parent 437fe17db0
commit f96b506abf
3 changed files with 14 additions and 28 deletions
-3
View File
@@ -22,7 +22,6 @@ write_prefixs_to_html_file :: proc(file: ^os.File) {
}
walk_tree_and_get_md_names :: proc(path: string, allocator := context.allocator) -> [dynamic]string {
files := make([dynamic]string, allocator)
w := os.walker_create(path)
@@ -81,7 +80,6 @@ walk_tree :: proc(path: string) -> []u8 {
parse_file_md_to_html :: proc(filename: string, allocator := context.allocator) -> (parsed: string, err: os.Error) {
str := os.read_entire_file_from_path(filename, allocator) or_return
root := cm.parse_document(raw_data(str), len(str), cm.DEFAULT_OPTIONS)
defer cm.node_free(root)
@@ -89,6 +87,5 @@ parse_file_md_to_html :: proc(filename: string, allocator := context.allocator)
defer cm.free(html)
parsed = strings.clone_from_cstring(html, allocator)
return parsed, nil
}