Skip to content

Commit

Permalink
fix a small, cosmetic bug (regression) in the M2 textualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
dslmeinte committed Sep 17, 2024
1 parent bb8f753 commit a54a16b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/artifacts/chunks/languages/multi.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language multi
version: 1
dependsOn
library (1
dependsOn:
library (1)
entities (↓name):

concept Container
Expand Down
7 changes: 6 additions & 1 deletion packages/utilities/src/m3/textualizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ const asText = (node: M3Node): NestedString => {
`language ${node.name}`,
indented([
`version: ${node.version}`,
recurse(node.dependsOn, `dependsOn`, (language) => `${language.name} (${language.version}`),
node.dependsOn.length === 0
? []
: [
`dependsOn:`,
indented(node.dependsOn.map((language) => `${language.name} (${language.version})`))
],
`entities (↓name):`,
``,
indented(nameSorted(node.entities).map((entity) => [asText(entity), ``]))
Expand Down

0 comments on commit a54a16b

Please sign in to comment.