File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ const commonmarkParser = new commonmark.Parser()
1313// ```
1414function parseMarkdown ( card ) {
1515 if ( ! card . note ) {
16- return new Map ( ) // no Rules
16+ return [ ] // no Rules
1717 }
1818 const root = commonmarkParser . parse ( card . note )
1919 const walker = root . walker ( )
20- const parsedRules = new Map ( )
20+ const parsedRules = [ ]
2121 let walkEvent
2222 while ( ( walkEvent = walker . next ( ) ) ) {
2323 const { node} = walkEvent
@@ -38,7 +38,7 @@ function parseMarkdown (card) {
3838 if ( args . length === 0 && node . next && node . next . literal ) {
3939 args = node . next . literal . trim ( ) . split ( ' ' ) . map ( ( arg ) => arg . trim ( ) )
4040 }
41- parsedRules . set ( node . literal , args )
41+ parsedRules . push ( { ruleName : node . literal , ruleArgs : args } )
4242 }
4343 }
4444 }
@@ -64,11 +64,11 @@ module.exports = function extractAutomationRules (projects) {
6464
6565 allCards . forEach ( ( { card, column} ) => {
6666 const rules = parseMarkdown ( card )
67- rules . forEach ( ( ruleArgs , ruleName ) => {
67+ rules . forEach ( ( r ) => {
6868 automationRules . push ( {
6969 column,
70- ruleName,
71- ruleArgs
70+ r . ruleName ,
71+ r . ruleArgs
7272 } )
7373 } )
7474 } )
You can’t perform that action at this time.
0 commit comments