AemieJ edited a comment on pull request #3879:
URL: https://github.com/apache/camel/pull/3879#issuecomment-637991186


   > We need a better sorting algorithm.
   > If the summary-group was always the same as the docTitle, then I think the 
comparison for the sort could be (lets assume everything is uppercased already):
   > comparing (docTitle1, group1) and (docTitle2, group2):
   > 
   > * notice if they are equal, return 0
   > * if group1 and group2 are null, then return comparison docTitle1 and 
docTitle2
   > * if group1 and group2 are both present, compare them
   >   -- if not equal, return comparison
   >   -- if equal, return comparison of docTitle1 and docTitle2
   > * if only group1 is present:
   >   -- if group1 === docTitle2, then the first item is after the second item.
   >   -- otherwise, return the comparison of group1 and docTitle2.
   > * if only group2 is present:
   >   -- if docTitle1 === group2, then the first item is before the second 
item.
   >   -- otherwise, return the comparison of docTitle1 and group2.
   > 
   > Does this make sense? Assuming it does, do you want to write the code for 
this or shall I?
   
   For the summary page of AWS i.e **aws-summary.adoc** will be always sorted 
before **aws2-summary.adoc**  as they both don't contain group attribute and 
their docTitle will be compared and **AWS** will come before **AWS2**. Also, I 
thought we were keeping **summary-group** attribute so in the future to 
auto-generate the index list within summary pages.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to