]> Git repositories of Nishi - docgen.git/commitdiff
fix how it handles sections
authorNishi <nishi@nishi.boats>
Tue, 15 Oct 2024 20:27:31 +0000 (20:27 +0000)
committerNishi <nishi@nishi.boats>
Tue, 15 Oct 2024 20:27:31 +0000 (20:27 +0000)
git-svn-id: file:///raid/svn-personal/docgen/trunk@15 44bc13e5-44cb-984e-b856-1907bf1ada44

docgen

diff --git a/docgen b/docgen
index 2ed7e326352da98a30655ad66fa7679d9528b332..468b84c0ed7908aed8cfaafbdd4c6d36111dee42 100755 (executable)
--- a/docgen
+++ b/docgen
@@ -265,6 +265,7 @@ proc parse_markdown {path _result} {
                                                set name [regsub {^(#+) } "$line" {}]
                                        }
                                        set line "<h$n id=\"TOC-[regsub -all { } "$name" "-"]\">$link $name</h$n>"
+                                       set blank 0
                                }
                                if { [regexp -- {\\$} "$line" ] } {
                                        set line "[regsub {\\$} "$line" {<br>}]"
@@ -286,7 +287,8 @@ proc rescan {path dots append} {
        global output_directory input_directory icon genre_list title
        set l [glob -tails -nocomplain -directory "$input_directory/$path" "{.rules.md,index.md,*}"]
        foreach element $l {dict set tmp $element 1}
-       foreach name [dict keys $tmp] {
+       set l [lsort [dict keys $tmp]]
+       foreach name $l {
                if { [file type "$input_directory/$path/$name"] == "directory" } {
                        file mkdir "$output_directory/$append/$path/$name"
                        rescan "$path/$name" "$dots../" "$append"