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
Select Git revision
  • master
  • 1.2.0
  • 1.2.1
  • 1.2.2
  • 1.2.3
  • 1.2.4
  • v1.1.0
7 results

Target

Select target project
  • oss/utilities/documentation-manager
1 result
Select Git revision
  • master
  • 1.2.0
  • 1.2.1
  • 1.2.2
  • 1.2.3
  • 1.2.4
  • v1.1.0
7 results
Show changes

Commits on Source 2

...@@ -5,6 +5,7 @@ package document ...@@ -5,6 +5,7 @@ package document
import ( import (
"errors" "errors"
"fmt"
"os" "os"
"path" "path"
"path/filepath" "path/filepath"
...@@ -40,13 +41,21 @@ func (m SourceFileMap) findByHash(hash string) *SourceFile { ...@@ -40,13 +41,21 @@ func (m SourceFileMap) findByHash(hash string) *SourceFile {
func buildFileMap(files []*SourceFile) (SourceFileMap, []string) { func buildFileMap(files []*SourceFile) (SourceFileMap, []string) {
sort.Slice(files, func(i, j int) bool { sort.Slice(files, func(i, j int) bool {
if files[i].level == files[j].level { if files[i].relSourcePath == files[j].relSourcePath {
return 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)) keys := make([]string, 0, len(files))
mapFiles := make(map[string]*SourceFile) mapFiles := make(map[string]*SourceFile)
for _, file := range files { for _, file := range files {
......
...@@ -239,12 +239,11 @@ func buildTree(body string) *Tree[DocumentNode] { ...@@ -239,12 +239,11 @@ func buildTree(body string) *Tree[DocumentNode] {
if title, err := s.Html(); err == nil { if title, err := s.Html(); err == nil {
aID = slug.Make(title) aID = slug.Make(title)
} else {
aID = "" + e.DataAtom.String() + "-" + randomID()
} }
s.SetAttr("id", aID) if aID == "" {
aID = "" + e.DataAtom.String() + "-" + randomID()
}
} }
payload := DocumentNode{ payload := DocumentNode{
......
{ {
"version": "1.1.6" "version": "1.1.7"
} }
\ No newline at end of file