mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-16 18:54:12 +01:00
chore: apply review suggestions
* pref: optimize `common` rules and matchers * chore: rename diagrams services to short form * chore: sort imports
This commit is contained in:
17
packages/parser/src/language/pie/valueConverter.ts
Normal file
17
packages/parser/src/language/pie/valueConverter.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { CstNode, GrammarAST, ValueType } from 'langium';
|
||||
|
||||
import { MermaidValueConverter } from '../common/valueConverter.js';
|
||||
|
||||
export class PieValueConverter extends MermaidValueConverter {
|
||||
protected runCustomConverter(
|
||||
rule: GrammarAST.AbstractRule,
|
||||
input: string,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
_cstNode: CstNode
|
||||
): ValueType | undefined {
|
||||
if (rule.name !== 'PIE_SECTION_LABEL') {
|
||||
return undefined;
|
||||
}
|
||||
return input.replace(/"/g, '').trim();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user