File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
src/recipes/name_and_image Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,20 @@ export class NameAndImageRecipe<ParsedElement extends NameAndImage> implements R
5757 const headerRow = this . markdownTableFactory . tableRowNode (
5858 headers . map ( header => this . markdownTableFactory . textTableCellNode ( header ) )
5959 ) ;
60- const puzzleRows = puzzles . map ( puzzle =>
61- this . markdownTableFactory . tableRowNode ( [
62- this . markdownTableFactory . textTableCellNode ( puzzle . name ) ,
63- this . markdownTableFactory . imageTableCellNode ( puzzle . imageLink , 100 ) ,
64- this . markdownTableFactory . textTableCellNode ( puzzle . status )
65- ] )
66- ) ;
60+ const puzzleRows = puzzles
61+ . sort ( ( first , second ) =>
62+ first . name . localeCompare ( second . name , undefined , {
63+ numeric : true ,
64+ sensitivity : 'base'
65+ } )
66+ )
67+ . map ( puzzle =>
68+ this . markdownTableFactory . tableRowNode ( [
69+ this . markdownTableFactory . textTableCellNode ( puzzle . name ) ,
70+ this . markdownTableFactory . imageTableCellNode ( puzzle . imageLink , 100 ) ,
71+ this . markdownTableFactory . textTableCellNode ( puzzle . status )
72+ ] )
73+ ) ;
6774 const table = this . markdownTableFactory . table ( headerRow , puzzleRows ) ;
6875
6976 return this . markdownTableConverter . tableToString ( table ) ;
You can’t perform that action at this time.
0 commit comments