Skip to content

Commit

Permalink
Fix #4063 Parse \item args for env pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Nov 18, 2023
1 parent 9f7a9c3 commit a8d808b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/envpair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ export class EnvPair {
return currentCommandPair
}
}
// #4063
if (node.content === 'item' && node.args) {
for (let argIndex = 0; argIndex < node.args.length; argIndex++) {
for (let index = 0; index < node.args[argIndex].content.length; index++) {
const subnode = node.args[argIndex].content[index]
const subnext = index === node.args[argIndex].content.length - 1 ? undefined : node.args[argIndex].content[index + 1]
parentCommandPair = this.buildCommandPairTreeFromNode(doc, subnode, subnext, parentCommandPair, commandPairs)
}
}
}
}
return parentCommandPair
}
Expand Down

0 comments on commit a8d808b

Please sign in to comment.