Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • oss/utilities/documentation-manager
1 result
Show changes
Commits on Source (2)
......@@ -5,6 +5,7 @@ package document
import (
"errors"
"fmt"
"os"
"path"
"path/filepath"
......@@ -40,13 +41,21 @@ func (m SourceFileMap) findByHash(hash string) *SourceFile {
func buildFileMap(files []*SourceFile) (SourceFileMap, []string) {
sort.Slice(files, func(i, j int) bool {
if files[i].level == files[j].level {
return files[i].relSourcePath < files[j].relSourcePath
if files[i].relSourcePath == files[j].relSourcePath {
if files[i].level < files[j].level {
return true
}
return files[i].level < files[j].level
}
return files[i].level < files[j].level
return files[i].relSourcePath < files[j].relSourcePath
})
for _, f := range files {
fmt.Println(f.relSourcePath, f.level)
}
keys := make([]string, 0, len(files))
mapFiles := make(map[string]*SourceFile)
for _, file := range files {
......
......@@ -239,12 +239,11 @@ func buildTree(body string) *Tree[DocumentNode] {
if title, err := s.Html(); err == nil {
aID = slug.Make(title)
} else {
aID = "" + e.DataAtom.String() + "-" + randomID()
}
s.SetAttr("id", aID)
if aID == "" {
aID = "" + e.DataAtom.String() + "-" + randomID()
}
}
payload := DocumentNode{
......
{
"version": "1.1.6"
"version": "1.1.7"
}
\ No newline at end of file