Commits

Thibaut Colar committed d98cd0b

Proper sorting of funcs / tags in help pane search results

  • Participants
  • Parent commits 554a35a

Comments (0)

Files changed (2)

File src/brie/fan/DocWebMod.fan

       if(trioInfo != null)
       {
         // axon extensions (trio sources)
-        trioInfo.funcs.each
+        trioInfo.funcs.vals.sort.each
         {
           html += "<a href='funcs#${it.name}'>$it.name</a><br/>"
         }
         // tags
         html += "<h3><b>Tags:</b></h3>"
-        trioInfo.tags.each
+        trioInfo.tags.vals.sort.each
         {
           html += "<a href='tags#${it.name}'>$it.name</a><br/>"
         }

File src/brie/fan/index/TrioModel.fan

     else
      return "<b>${name}</b>(?)"
   }
+
+  override Int compare(Obj that)
+  {
+    if(! (that is FuncInfo)) throw Err("Can't compare $typeof with $that.typeof")
+    return (that as FuncInfo).name <=> name
+  }
 }
 
 **
   Str name() {data["tag"] ?: ""}
   Str doc() {data["doc"] ?: ""}
   Str kind() {data["kind"] ?: ""}
+
+  override Int compare(Obj that)
+  {
+    if(! (that is TagInfo)) throw Err("Can't compare $typeof with $that.typeof")
+    return (that as TagInfo).name <=> name
+  }
 }