Commit Graph

40 Commits

Author SHA1 Message Date
Jason Dent 4a7489a7b6 chore: Update cspell and fix issues
- covert `cSpell.json` to `cspell.config.yaml`
- break up the word list into multiple dictionary files
- fix spelling issues
- Enable spell checking code for non-test files
2024-02-14 23:17:44 +01:00
Alois Klink 172d90e731 fix(flow): fix invalid ellipseText regex
This invalid regex was causing Mermaid to freeze.
2023-11-06 10:08:12 +00:00
Sidharth Vinod 1e0918c2ff
refactor: Remove directives from grammar 2023-08-25 12:55:58 +05:30
Ibrahim Wassouf c9db0ee749 Add specialChars in textNoTagsToken, alphaNumToken
This will ensure that alphaNumToken does not lose any of
the previously used tokens in its definition. The same
tokens were added to textNoTagsToken explicitly, because it used to
have alphaNumToken in its definition before I removed it.

Previously, textNoTagsToken and alphaNumToken had many tokens in
common in their definition. To avoid grammar conflicts, the
alphaNumStatement grammar was created. However, I found this
unintuitive and was an extra step just to avoid repetition in
the definitions.

I opted to have repetition in the definitions of textNoTagsToken
and alphaNumToken and it be explicitly clear right away, rather than
have extra grammar statements like alphaNumStatement which don't look
like they do anything at first glance
2023-08-03 21:05:41 -03:00
Ibrahim Wassouf 850513fa3d Return Unicode Text to idStringToken definition 2023-08-03 20:58:37 -03:00
Ibrahim Wassouf 971215e353 Correct idStringToken definition to include all individual special tokens 2023-08-03 19:15:23 -03:00
Ibrahim Wassouf e3c5e6f095 Modify HREF token regex to contain space
This attempts to maintain the current behaviour.
Previously, because HREF contained a space and called
a state, the href token was able to be placed in the
beginning of node ids (because it wouldn't conflict
without the space). We require the space to keep that
behaviour.
2023-08-01 07:54:48 -03:00
Ibrahim Wassouf 834c67ecaa Remove escaped quotes with backslash feature 2023-07-31 22:47:05 -03:00
Ibrahim Wassouf ed4feaebf2 Remove required space from TAGEND token regex
Originally, I thought this was necessary to prevent parsing
the token as part of an edge. I forgot that the token will always
be separated from the link/edge by the node id. Added an unit test
for an edge case to be certain.
2023-07-29 22:27:31 -03:00
Ibrahim Wassouf bed05ce061 Disallow any vertex shape start or end token in any text state 2023-07-29 21:23:05 -03:00
Ibrahim Wassouf d8897426cd Correct edge strings to have same configuration as vertex strings 2023-07-27 09:29:26 -03:00
Ibrahim Wassouf fd461b7860 Reimplement old alphaNumToken 2023-07-25 20:56:08 -03:00
Ibrahim Wassouf 30a9b5574d Correct classDef and class grammar
Previously, you were allowed to define a class called 'default'
but were not allowed to use it because the classStatement grammar
expected an alphanum, which did not include the word DEFAULT
2023-07-25 20:35:08 -03:00
Ibrahim Wassouf 20cd685ae3 Allow escaped quotations in strings 2023-07-24 22:43:55 -03:00
Ibrahim Wassouf 651274bc6f Only allow quotes to wrap entire string 2023-07-24 21:23:21 -03:00
Ibrahim Wassouf 4cfbd0d380 Remove unused definitions 2023-07-24 21:05:17 -03:00
Ibrahim Wassouf 45d92769aa Change rest of grammar statements to use variable name instead of position 2023-07-24 21:04:36 -03:00
Ibrahim Wassouf 474e0b9c82 Refactor vertex grammars to use name values instead of position in production 2023-07-23 21:54:42 -03:00
Ibrahim Wassouf 087738df78 Refactor statement grammars to use name values instead of positions in production 2023-07-23 21:39:21 -03:00
Ibrahim Wassouf fa8e02721a Refactor directive grammar to use name instead of position in production 2023-07-23 21:32:52 -03:00
Ibrahim Wassouf 4b9773a272 Refactor token precedence that concern vertex text states 2023-07-23 21:25:19 -03:00
Ibrahim Wassouf 3ab0e9998d Remove href state and give call higher precedence
Similar to what was done in the class diagram parser,
this will allow string tokens to appear in any state.
This is especially helpful, because it will simplify the
code and any future refactoring
2023-07-22 14:39:45 -03:00
Ibrahim Wassouf 0cc8f89115 Add edgeText states 2023-07-21 19:40:04 -03:00
Ibrahim Wassouf 8ff06e88ce Correct expected error message in unit test 2023-07-21 18:27:20 -03:00
Ibrahim Wassouf 3fa3ed7b18 Remove grammar and unit test that expects HEX token
This was never really used and had many things wrong with it.
I believe that if a hex was provided in the diagram specification,
the alphanum grammar would break it up into a BRKT and NUM token
and use the first line with the addVertex() function.

Second, the styleLink grammar provides the exact same functionality
with the linkStyle keyword.

Third, updateLink() expects an array of nums, not a hex digit.

Fourth, no documentation is provided on this grammar statement existing.
Fifth, the unit test does not work in version 10.2.4
2023-07-21 18:15:43 -03:00
Ibrahim Wassouf 0d7cc748b8 Replace alphanum with idString where appropriate 2023-07-21 17:33:33 -03:00
Ibrahim Wassouf 7adb1bccb3 Replace alphanum with NODE_STRING for most usecases
What this allows is for idStrings that are separated by
dashes or underscores to be considered one whole string
rather than a bunch of tokens mixed together.

This is necessary for examples such as a-node-graph[text].
Now, the last part of the idString 'graph' will be read as
part of the NODE_STRING token rather than attempting to add
a GRAPH token to the idString.
2023-07-20 23:49:43 -03:00
Ibrahim Wassouf 5b987dee93 Put parser in stable state 2023-07-20 13:05:18 -03:00
Ibrahim Wassouf 3496f275bc Re-implement markdown as its own text type 2023-07-19 22:56:53 -03:00
Ibrahim Wassouf b46c28425e Add text state and tests 2023-07-19 22:49:39 -03:00
Tom PERRILLAT-COLLOMB 9e024fd5f5 allow multiple vertices with style 2023-06-27 20:04:47 +02:00
Knut Sveidqvist 917a54f3cd
Merge branch 'develop' into 4220-string-synax-and-features 2023-04-03 12:31:56 +02:00
Knut Sveidqvist 471c842a58 Adding rendering tests and unit tests 2023-04-03 12:12:51 +02:00
Knut Sveidqvist 99f65813a1 Syntax for markdown strings is a single backtick. 2023-04-03 10:43:15 +02:00
Sidharth Vinod 48d267c6dc
fix(#4137): Cleanup comments before parsing 2023-03-30 22:08:50 +05:30
Knut Sveidqvist 4caf7d7c7b Adding support for markdown string in flowchart-elk 2023-03-29 16:01:08 +02:00
Knut Sveidqvist 63160293c7 Updating support for the new type of strings for flowcharts-v2 2023-03-28 15:28:52 +02:00
Knut Sveidqvist 3a71618a49 #3192 Adding the ability to create invisible links in flowcharts(v2) 2023-02-20 11:08:25 +01:00
Sidharth Vinod 242a508d50
feat: Flowchart-elk integration 2023-01-12 18:26:08 +05:30
Knut Sveidqvist 8dd82839cb Relocation of files 2022-09-21 11:03:33 +02:00
Renamed from src/diagrams/flowchart/parser/flow.jison (Browse further)