added fmt and defer
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user