1940 Commits

Author SHA1 Message Date
Daniel Bartholomae
2cf9348f53 Add test for handling parameter names that are keywords 2022-08-23 16:12:16 +02:00
Daniel Bartholomae
d97ce7eab8 Add test for handling trailing whitespaces 2022-08-23 16:12:16 +02:00
Daniel Bartholomae
0c8f7163db Add first C4 parser test 2022-08-23 16:12:16 +02:00
Knut Sveidqvist
280c7e8da1 #3243 Adding disabled testcase for diagram with leading \n 2022-08-21 11:05:13 +02:00
Knut Sveidqvist
02fc68a3f6
Merge pull request #3330 from mermaid-js/3306_Fix_Gitgraph_Parsing_Issue
Fix for GitGraphs not working for Mermaid Live Editor
2022-08-18 19:43:17 +02:00
ashishj
a9e798c399 Making sure to addDiagrams before detectType call 2022-08-18 19:39:32 +02:00
Knut Sveidqvist
1befbe08ff #3308 Allowing br tags in tooltips 2022-08-18 19:11:33 +02:00
ashishj
b21cb43639 Moved diagram registration out of initialize func 2022-08-18 17:54:42 +02:00
Ashish Jain
52fcb92f51
Merge pull request #3277 from alguerocode/clean-code-1
code syntax improvment (initialize func)
2022-08-18 17:01:02 +02:00
Knut Sveidqvist
cb4b60e8e4
Merge pull request #3310 from hrgui/fix/3305-subsequent-diagrams-issue
fix(Diagram): fix persisted data due to db not being cleared before parsing
2022-08-11 18:55:23 +02:00
Knut Sveidqvist
bf4272102d #3313 Packaging the thrown error in reconised structure 2022-08-11 18:24:14 +02:00
Harman Goei
6e5eeb7215 fix(Diagram): C4C diagram does not have a db.clear method 2022-08-09 22:22:40 -07:00
Harman Goei
a5aef9e330 fix(Diagram): fix persisted data due to db not being cleared before parsing 2022-08-09 21:41:07 -07:00
Knut Sveidqvist
44cb1acbb2 Fix for broken test 2022-08-04 13:16:48 +02:00
Knut Sveidqvist
b0074bf723
Merge pull request #3222 from leon19/bugfix/incorrect-label-padding
fix: remove right padding when a label contains HTML entities
2022-08-04 13:06:46 +02:00
Knut Sveidqvist
aa9149912d Merge branch 'bug/3011_multiline_alignment' of github.com:hype09/mermaid into hype09-bug/3011_multiline_alignment 2022-08-04 13:05:17 +02:00
salah alhashmi
fb6bf87161 code syntax improvment (initialize func) 2022-08-03 14:16:02 +04:00
Muhammad Faisal Bin Arba'in
846531363e PR comments 2022-08-01 19:41:53 +08:00
Muhammad Faisal Bin Arba'in
91e369a840 rename const name 2022-08-01 19:41:53 +08:00
Muhammad Faisal Bin Arba'in
81ff4416dc rotate class id when branch more than 8 2022-08-01 19:41:53 +08:00
Lorens León
c40368b0fa fix: remove right padding when a label contains HTML entities
Decode the HTML entities from the label text before adding them to the
HTML this prevents a miss-calculation of the label text length
2022-07-26 21:50:36 +02:00
Knut Sveidqvist
8681e78e50 Fixes for rendering tests 2022-07-20 14:39:01 +02:00
Knut Sveidqvist
4c30e03f1e Using diagram api to add gitGraph 2022-07-18 16:00:03 +02:00
Knut Sveidqvist
0d4b09a0a0 Handle legacy state diagram and start using Generic diagram in mermaidAPI 2022-07-04 22:55:11 +02:00
Knut Sveidqvist
408c08d2a3 Fix for v2 class diagram 2022-07-04 22:41:09 +02:00
Knut Sveidqvist
10f56129c1 Fix for legacy class diagram 2022-07-04 19:37:56 +02:00
Knut Sveidqvist
bc6830cbdb Handling of requirement diagrams using the generic diagram 2022-07-04 18:50:50 +02:00
Knut Sveidqvist
c5f78077ff Fix for broken tests 2022-07-04 18:22:36 +02:00
Knut Sveidqvist
682a1404ca Fixes for erDiagram, pie charts and journey diagram 2022-07-04 18:11:58 +02:00
Knut Sveidqvist
5318ec6dbf Handling gantt and flowchart-v2 2022-07-04 15:33:39 +02:00
Knut Sveidqvist
490ddd9a15 Fix for tests 2022-07-04 14:25:25 +02:00
Knut Sveidqvist
1675174b2a Fix for flowcharts 2022-07-04 12:37:50 +02:00
Knut Sveidqvist
48ad6e6042 Merge branch 'develop' into 3061_refactoring_and_modularisation 2022-07-04 11:38:52 +02:00
Knut Sveidqvist
bedc9399c5 Updating c4 and sequence 2022-07-04 11:29:38 +02:00
Paik Paustian
ed29fe1aa9 Fix #3011: Support left- and right-alignment for multi-line messages and notes
Previously, messages and notes that had multiple lines (via `<br>`-tags) were only displayed correctly
when using the default `center` value for the `messageAlign` and `noteAlign` configuration options.
Using `left` or `right` for the alignment options caused the text to collapse and become illegible,
as outlined in issue #3011.

This comes as a side-effect from how the internal `valign` text-rendering option was configured for
messages and notes:

```js
// Example from `sequenceRenderer.js: drawMessage()`
textObj.anchor = conf.messageAlign;
textObj.valign = conf.messageAlign;
```

Both the `anchor` option (which controls left-right alignment) and the `valign` option (which controls
vertical top-down placement) were set to the same value, the user-provided `messageAlign` config option.

While `left` and `right` are valid values for the `anchor` option, they were effectively no-ops for the
`valign` option, which only supports `top`, `start`, `middle`, `center`, `bottom`, and `end`.

To fix the issue, the `valign` property is now always set to `center` for notes and messages.
Similarly, the `dominantBaseline` option of texts is now always set to `middle`, rather than setting it to
either `text-{before,after}-edge`, which caused left-aligned multi-line text to always be "top-left" aligned
inside a note (or "bottom-right" when attempting to right-align).

Now, texts in messages and notes are always vertically centered and alignment options correctly apply for
both single and multi-line content.
2022-07-03 11:59:57 +02:00
Sidharth Vinod
5b15865d30
fix #3184: Inject xlink in mermaidAPI. (#3185)
* fix #3184: Inject xlink in mermaidAPI.

* fix static analysis
2022-07-03 10:37:27 +02:00
ashishj
1dfddfde54 Merge branch 'release/9.1.3' into 3061_refactoring_and_modularisation 2022-06-28 20:12:03 +02:00
Ashish Jain
1f4c1c3a6c
Merge pull request #3140 from mermaid-js/#3095-Gitgrph-Font-Size
#3095 Added support for commit & tag label font size
2022-06-28 19:11:16 +02:00
Ashish Jain
cc45f3ca01
Merge pull request #3151 from pinghe/develop
Add C4 Diagram. Compatible with C4-PlantUML syntax (2). #3038
2022-06-28 19:10:42 +02:00
Ashish Jain
259abb081a
Merge pull request #3176 from yutotnh/fix-typo
Fix typo
2022-06-28 19:01:35 +02:00
Knut Sveidqvist
0ae1bdb61a
Merge pull request from GHSA-x3vm-38hw-55wf
CSS Injection security issue
2022-06-28 18:55:12 +02:00
Knut Sveidqvist
5110e42786 Better balance check 2022-06-28 18:50:41 +02:00
yutotnh
0d6109c7a8
Merge branch 'develop' into fix-typo 2022-06-27 12:43:55 +09:00
yutotnh
4d4b77f39f
fix: typo for source 2022-06-27 12:34:28 +09:00
Knut Sveidqvist
8484d55a6a Fix fir tests 2022-06-26 21:30:49 +02:00
Knut Sveidqvist
0a55cda0a9 Rendering statediagram v2 using the diagram passed from mermaidAPI 2022-06-26 21:05:30 +02:00
Knut Sveidqvist
2480a5eaa2 Merge remote-tracking branch 'origin/develop' into 3061_refactoring_and_modularisation 2022-06-26 14:28:11 +02:00
Sidharth Vinod
0e47c0ee6c
fix #3019 Add word boundary to FK&PK. (#3168) 2022-06-23 08:20:32 +02:00
Knut Sveidqvist
2792bb41de Updated allowed characters to accomodate fonts and rgba colors 2022-06-22 08:16:55 +02:00
yutotnh
ca909edbed
fix: Typo for documents and comments 2022-06-22 12:39:10 +09:00