diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 67fc140..0000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -fixtures/ diff --git a/fixtures/error/expected.html b/fixtures/error/expected.html index 5264b40..a7596db 100644 --- a/fixtures/error/expected.html +++ b/fixtures/error/expected.html @@ -23,4 +23,4 @@

Error

} } -

More content

\ No newline at end of file +

More content

diff --git a/fixtures/errorEmpty/expected.html b/fixtures/errorEmpty/expected.html index 0f15354..91233d1 100644 --- a/fixtures/errorEmpty/expected.html +++ b/fixtures/errorEmpty/expected.html @@ -1,3 +1,3 @@

Error

This is an invalid diagram

-

More content

\ No newline at end of file +

More content

diff --git a/fixtures/forest/expected.html b/fixtures/forest/expected.html index 37ea9fd..68e5b10 100644 --- a/fixtures/forest/expected.html +++ b/fixtures/forest/expected.html @@ -1,2 +1,441 @@

An example of a flowchart

-

A
B
C
D

\ No newline at end of file +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+ + + + + +
+ A +
+
+
+ + + + +
+ B +
+
+
+ + + + +
+ C +
+
+
+ + + + +
+ D +
+
+
+
+
+
+
+

diff --git a/fixtures/forest/expected.md b/fixtures/forest/expected.md index e2e7153..cad865f 100644 --- a/fixtures/forest/expected.md +++ b/fixtures/forest/expected.md @@ -1,3 +1,29 @@ # An example of a flowchart -
A
B
C
D
+
A
B
C
D
diff --git a/fixtures/multiple/expected.html b/fixtures/multiple/expected.html index 5fa985d..e694bbd 100644 --- a/fixtures/multiple/expected.html +++ b/fixtures/multiple/expected.html @@ -1,9 +1,2200 @@

Demos

Basic sequence diagram

-

JohnBobAliceJohnBobAliceBob thinks a longlong time, so longthat the text doesnot fit on a row.Hello Bob, how are you?How about you John?I am good thanks!I am good thanks!Checking with John...Yes... John, how are you?

+

+ + + + + John + + + + + + Bob + + + + + + Alice + + + + + + + + John + + + + + + + + + Bob + + + + + + + + + Alice + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bob thinks a long + + + long time, so long + + + that the text does + + + not fit on a row. + + + + Hello Bob, how are you? + + + + How about you John? + + + + I am good thanks! + + + + I am good thanks! + + + + Checking with John... + + + + Yes... John, how are you? + + + +

Basic flowchart

-

Link text
Square Rect
Circle
Round Rect
Rhombus

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Link text +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+ + + + + +
+ Square Rect +
+
+
+ + + + +
+ Circle +
+
+
+ + + + +
+ Round Rect +
+
+
+ + + + +
+ Rhombus +
+
+
+
+
+
+
+

Loops, alt and opt

-

BobAliceBobAlicealt[is sick][is well]opt[Extra response]loop[Daily query]Hello Bob, how are you?Not so good :(Feeling fresh like a daisyThanks for asking

+

+ + + + + Bob + + + + + + Alice + + + + + + + + Bob + + + + + + + + + Alice + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + alt + + + [is sick] + + + [is well] + + + + + + + + + + opt + + + [Extra response] + + + + + + + + + + loop + + + [Daily query] + + + + Hello Bob, how are you? + + + + Not so good :( + + + + Feeling fresh like a daisy + + + + Thanks for asking + + + +

Message to self in loop

-

JohnBobAliceJohnBobAliceloop[Healthcheck]Rational thoughtsprevail...Hello John, how are you?Fight against hypochondriaGreat!How about you?Jolly good!

\ No newline at end of file +

+ + + + + John + + + + + + Bob + + + + + + Alice + + + + + + + + John + + + + + + + + + Bob + + + + + + + + + Alice + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + loop + + + [Healthcheck] + + + + + + Rational thoughts + + + prevail... + + + + Hello John, how are you? + + + + Fight against hypochondria + + + + Great! + + + + How about you? + + + + Jolly good! + + + +

diff --git a/fixtures/multiple/expected.md b/fixtures/multiple/expected.md index 7396879..8a605fa 100644 --- a/fixtures/multiple/expected.md +++ b/fixtures/multiple/expected.md @@ -2,16 +2,172 @@ ## Basic sequence diagram -JohnBobAliceJohnBobAliceBob thinks a longlong time, so longthat the text doesnot fit on a row.Hello Bob, how are you?How about you John?I am good thanks!I am good thanks!Checking with John...Yes... John, how are you? +JohnBobAliceJohnBobAliceBob +thinks a +longlong +time, so +longthat +the text +doesnot +fit on a +row.Hello +Bob, how are +you?How +about you +John?I +am good +thanks!I +am good +thanks!Checking +with +John...Yes... +John, how are +you? ## Basic flowchart -
Link text
Square Rect
Circle
Round Rect
Rhombus
+
Link +text
Square +Rect
Circle
Round +Rect
Rhombus
## Loops, alt and opt -BobAliceBobAlicealt[is sick][is well]opt[Extra response]loop[Daily query]Hello Bob, how are you?Not so good :(Feeling fresh like a daisyThanks for asking +BobAliceBobAlicealt[is +sick][is +well]opt[Extra +response]loop[Daily +query]Hello +Bob, how are +you?Not +so good +:(Feeling +fresh like a +daisyThanks +for +asking ## Message to self in loop -JohnBobAliceJohnBobAliceloop[Healthcheck]Rational thoughtsprevail...Hello John, how are you?Fight against hypochondriaGreat!How about you?Jolly good! +JohnBobAliceJohnBobAliceloop[Healthcheck]Rational +thoughtsprevail...Hello +John, how are +you?Fight +against +hypochondriaGreat!How +about +you?Jolly +good! diff --git a/fixtures/nested/expected.html b/fixtures/nested/expected.html index e966972..b826f6e 100644 --- a/fixtures/nested/expected.html +++ b/fixtures/nested/expected.html @@ -1,6 +1,445 @@

Simple

This is a simple mermaid diagram nested in a blockquote.

-

A
B
C
D

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+ + + + + +
+ A +
+
+
+ + + + +
+ B +
+
+
+ + + + +
+ C +
+
+
+ + + + +
+ D +
+
+
+
+
+
+
+

-

It is rendered above.

\ No newline at end of file +

It is rendered above.

diff --git a/fixtures/nested/expected.md b/fixtures/nested/expected.md index c407bfd..6109683 100644 --- a/fixtures/nested/expected.md +++ b/fixtures/nested/expected.md @@ -2,6 +2,33 @@ This is a simple mermaid diagram nested in a blockquote. ->
A
B
C
D
+>
A
B
C
D
It is rendered above. diff --git a/fixtures/no-mermaid/expected.html b/fixtures/no-mermaid/expected.html index 6ad2e7e..28c00ab 100644 --- a/fixtures/no-mermaid/expected.html +++ b/fixtures/no-mermaid/expected.html @@ -1,3 +1,3 @@

No medmaid

console.log('This is a JavaScript code block')
-
\ No newline at end of file + diff --git a/fixtures/simple/expected.html b/fixtures/simple/expected.html index 828945d..4b34345 100644 --- a/fixtures/simple/expected.html +++ b/fixtures/simple/expected.html @@ -1,4 +1,443 @@

Simple

This is a simple mermaid diagram.

-

A
B
C
D

-

It is rendered above.

\ No newline at end of file +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+ + + + + +
+ A +
+
+
+ + + + +
+ B +
+
+
+ + + + +
+ C +
+
+
+ + + + +
+ D +
+
+
+
+
+
+
+

+

It is rendered above.

diff --git a/fixtures/simple/expected.md b/fixtures/simple/expected.md index 628853c..c52ccc7 100644 --- a/fixtures/simple/expected.md +++ b/fixtures/simple/expected.md @@ -2,6 +2,32 @@ This is a simple mermaid diagram. -
A
B
C
D
+
A
B
C
D
It is rendered above. diff --git a/src/remark-mermaidjs.test.ts b/src/remark-mermaidjs.test.ts index 49e5564..d173722 100644 --- a/src/remark-mermaidjs.test.ts +++ b/src/remark-mermaidjs.test.ts @@ -10,6 +10,7 @@ import { VFile } from 'vfile' testFixturesDirectory({ directory: new URL('../fixtures', import.meta.url), + prettier: true, tests: { 'expected.md'(input, options) { return remark().use(remarkMermaid, options).process(input)