mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-14 22:09:29 +02:00
fix: add classLiteral to the language for class diagram namespace
This commit is contained in:
@@ -15,4 +15,12 @@ describe('class diagram', function () {
|
||||
expect(() => parser.parse(`classDiagram\nnamespace ${prop} {\n\tclass A\n}`)).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe('backtick escaping', function () {
|
||||
it('should handle backtick-quoted namespace names', function () {
|
||||
expect(() =>
|
||||
parser.parse(`classDiagram\nnamespace \`A::B\` {\n\tclass \`IPC::Sender\`\n}`)
|
||||
).not.toThrow();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -242,6 +242,7 @@ classLabel
|
||||
|
||||
namespaceName
|
||||
: alphaNumToken { $$=$1; }
|
||||
| classLiteralName { $$=$1; }
|
||||
| alphaNumToken DOT namespaceName { $$=$1+'.'+$3; }
|
||||
| alphaNumToken namespaceName { $$=$1+$2; }
|
||||
;
|
||||
|
Reference in New Issue
Block a user