File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,8 @@ class HelpGenerator:
322322 this-examples := command_ .examples_ .map : | example / Example | [ example , path_ ]
323323 sub-examples := []
324324 add-global-examples_ command_ sub-examples --path = path_ --skip-first-level
325- sub-examples .sort --in-place : | a / List b / List | a [ 0 ] .global-priority - b [ 0 ] .global-priority
325+ // Higher priority examples should come first.
326+ sub-examples .sort --in-place : | a / List b / List | b [ 0 ] .global-priority .compare-to a [ 0 ] .global-priority
326327
327328 all-examples := this-examples + sub-examples
328329 if all-examples .is-empty : return
Original file line number Diff line number Diff line change @@ -769,17 +769,17 @@ test-examples:
769769 # Root example 2:
770770 root sub2
771771
772+ # Example 5:
773+ root sub2 global5
774+
775+ # Example 1:
776+ root sub global3
777+
772778 # Example 3:
773779 root sub global1
774780
775781 # Example 6:
776782 root sub2 global1
777-
778- # Example 1:
779- root sub global3
780-
781- # Example 5:
782- root sub2 global5
783783 """
784784 actual = build-examples .call [ cmd ]
785785 expect-equals expected actual
You can’t perform that action at this time.
0 commit comments