Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove directives from grammars. #4755

Closed
sidharthv96 opened this issue Aug 21, 2023 · 0 comments · Fixed by #4759
Closed

Remove directives from grammars. #4755

sidharthv96 opened this issue Aug 21, 2023 · 0 comments · Fixed by #4759
Labels
Type: Other Not an enhancement or a bug

Comments

@sidharthv96
Copy link
Member

Description

  • In render, detectInit is called to parse the directives using regex and we're sending that to addDirective
  • Then, when parsing, the jison grammar parses the directives again, then parseDirective of the diagramDB is called, which calls parseDirective in DirectiveUtils.ts. The only thing extra being done there is p.setWrap. This also calls addDirective, possibly adding a duplicate directive to the array.

Steps to reproduce

Follow the flow of code.

Screenshots

No response

Code Sample

No response

Setup

No response

Suggested Solutions

  • Remove all the directive syntax from grammar
  • Remove the parseDirective function
  • Handle the p.setWrap somehow.
  • When calling render, remove the frontmatter, directives and comments in the beginning itself.

Additional Context

No response

@sidharthv96 sidharthv96 added Type: Bug / Error Something isn't working or is incorrect Status: Triage Needs to be verified, categorized, etc Type: Other Not an enhancement or a bug and removed Type: Bug / Error Something isn't working or is incorrect Status: Triage Needs to be verified, categorized, etc labels Aug 21, 2023
@sidharthv96 sidharthv96 linked a pull request Aug 22, 2023 that will close this issue
4 tasks
@knsv knsv closed this as completed in #4759 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Other Not an enhancement or a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant