Skip to content

Commit

Permalink
Merge pull request #26 from demike/fix/nomnoml-parser-error
Browse files Browse the repository at this point in the history
fix: nomnoml parser error
  • Loading branch information
demike authored Jun 23, 2023
2 parents 1a7a5d5 + 3190590 commit 1631b66
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 78 deletions.
150 changes: 79 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
},
"devDependencies": {
"@types/node": "^18.11.18",
"@types/yargs": "^17.0.19"
"@types/yargs": "^17.0.24"
},
"dependencies": {
"chalk": "^4.1.2",
"nomnoml": "^1.5.3",
"ts-morph": "^17.0.1",
"typescript": "^4.9.4",
"yargs": "^17.6.2"
"nomnoml": "^1.6.1",
"ts-morph": "^19.0.0",
"typescript": "^5.1.3",
"yargs": "^17.7.2"
},
"scripts": {
"build": "tsc -p tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion src/core/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function emitMemberAssociations(associations?: MemberAssociation[]) {

// utility functions
function escapeNomnoml(str: string) {
return str.replace(/[|\][]/g, '\\$&');
return str.replace(/[|\][\#]/g, '\\$&');
}

function xmlEncode(str: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function modifierTemplate(modifierFlags: ModifierFlags): string {
if(modifierFlags & ModifierFlags.Private) {
retVal = "-" + retVal;
} else if(modifierFlags & ModifierFlags.Protected) {
retVal = "#" + retVal;
retVal = "\\#" + retVal;
} else {
retVal = "+" + retVal;
}
Expand Down

0 comments on commit 1631b66

Please sign in to comment.