Skip to content

Commit 7fc69aa

Browse files
committed
Start adding new test case for parsing PlantUML timing diagrams
Still WIP
1 parent c9e7a1a commit 7fc69aa

1 file changed

Lines changed: 116 additions & 0 deletions

File tree

flexmark-ext-plantuml/src/test/resources/ext_plantuml_ast_spec.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,122 @@ Document[0, 87]
204204
PlantUmlBlockNode[0, 85]
205205
````````````````````````````````
206206

207+
PlantUML code block with timing diagram
208+
209+
```````````````````````````````` example PlantUML Code Block Node: 5
210+
# Timing diagram example
211+
212+
@startuml
213+
robust "DNS Resolver" as DNS
214+
robust "Web Browser" as WB
215+
concise "Web User" as WU
216+
217+
@0
218+
WU is Idle
219+
WB is Idle
220+
DNS is Idle
221+
222+
@+100
223+
WU -> WB : URL
224+
WU is Waiting
225+
WB is Processing
226+
227+
@+200
228+
WB is Waiting
229+
WB -> DNS@+50 : Resolve URL
230+
231+
@+100
232+
DNS is Processing
233+
234+
@+300
235+
DNS is Idle
236+
@enduml
237+
238+
A paragraph following.
239+
.
240+
<h1>Timing diagram example</h1>
241+
<figure>
242+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" data-diagram-type="TIMING" style="background: #FFFFFF; max-width: 100%;" version="1.1" viewBox="0 0 496 229" width="496px" zoomAndPan="magnify">
243+
<defs/>
244+
<g>
245+
<line style="stroke:#333333;stroke-width:0.5;" x1="10" x2="10" y1="10" y2="198.8281"/>
246+
<line style="stroke:#333333;stroke-width:0.5;" x1="479.3613" x2="479.3613" y1="10" y2="198.8281"/>
247+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="74.3613" x2="74.3613" y1="10" y2="198.8281"/>
248+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="124.3613" x2="124.3613" y1="10" y2="198.8281"/>
249+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="174.3613" x2="174.3613" y1="10" y2="198.8281"/>
250+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="224.3613" x2="224.3613" y1="10" y2="198.8281"/>
251+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="274.3613" x2="274.3613" y1="10" y2="198.8281"/>
252+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="324.3613" x2="324.3613" y1="10" y2="198.8281"/>
253+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="374.3613" x2="374.3613" y1="10" y2="198.8281"/>
254+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="424.3613" x2="424.3613" y1="10" y2="198.8281"/>
255+
<line style="stroke:#333333;stroke-width:0.5;stroke-dasharray:3,5;" x1="474.3613" x2="474.3613" y1="10" y2="198.8281"/>
256+
<line style="stroke:#333333;stroke-width:0.5;" x1="10" x2="479.3613" y1="10" y2="10"/>
257+
<text fill="#333333" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="92.5928" x="15" y="24.5332">DNS Resolver</text>
258+
<line style="stroke:#333333;stroke-width:0.5;" x1="10" x2="108.5928" y1="28.6094" y2="28.6094"/>
259+
<line style="stroke:#333333;stroke-width:0.5;" x1="108.5928" x2="118.5928" y1="28.6094" y2="10"/>
260+
<text fill="#333333" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="19.3477" x="15" y="59.5195">Idle</text>
261+
<text fill="#333333" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="59.3613" x="15" y="39.5195">Processing</text>
262+
<line style="stroke:#006400;stroke-width:2;" x1="74.3613" x2="274.3613" y1="53.6094" y2="53.6094"/>
263+
<line style="stroke:#006400;stroke-width:2;" x1="274.3613" x2="424.3613" y1="33.6094" y2="33.6094"/>
264+
<line style="stroke:#006400;stroke-width:2;" x1="424.3613" x2="474.3613" y1="53.6094" y2="53.6094"/>
265+
<line style="stroke:#006400;stroke-width:2;" x1="274.3613" x2="274.3613" y1="33.6094" y2="53.6094"/>
266+
<line style="stroke:#006400;stroke-width:2;" x1="424.3613" x2="424.3613" y1="33.6094" y2="53.6094"/>
267+
<line style="stroke:#333333;stroke-width:0.5;" x1="10" x2="479.3613" y1="65.6094" y2="65.6094"/>
268+
<text fill="#333333" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="89.4619" x="15" y="80.1426">Web Browser</text>
269+
<line style="stroke:#333333;stroke-width:0.5;" x1="10" x2="105.4619" y1="84.2188" y2="84.2188"/>
270+
<line style="stroke:#333333;stroke-width:0.5;" x1="105.4619" x2="115.4619" y1="84.2188" y2="65.6094"/>
271+
<text fill="#333333" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="19.3477" x="15" y="135.1289">Idle</text>
272+
<text fill="#333333" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="59.3613" x="15" y="115.1289">Processing</text>
273+
<text fill="#333333" font-family="sans-serif" font-size="12" lengthAdjust="spacing" textLength="40.0137" x="15" y="95.1289">Waiting</text>
274+
<line style="stroke:#006400;stroke-width:2;" x1="74.3613" x2="124.3613" y1="129.2188" y2="129.2188"/>
275+
<line style="stroke:#006400;stroke-width:2;" x1="124.3613" x2="224.3613" y1="109.2188" y2="109.2188"/>
276+
<line style="stroke:#006400;stroke-width:2;" x1="224.3613" x2="474.3613" y1="89.2188" y2="89.2188"/>
277+
<line style="stroke:#006400;stroke-width:2;" x1="124.3613" x2="124.3613" y1="109.2188" y2="129.2188"/>
278+
<line style="stroke:#006400;stroke-width:2;" x1="224.3613" x2="224.3613" y1="89.2188" y2="109.2188"/>
279+
<line style="stroke:#333333;stroke-width:0.5;" x1="10" x2="479.3613" y1="141.2188" y2="141.2188"/>
280+
<text fill="#333333" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacing" textLength="64.5723" x="15" y="155.752">Web User</text>
281+
<line style="stroke:#333333;stroke-width:0.5;" x1="10" x2="80.5723" y1="159.8281" y2="159.8281"/>
282+
<line style="stroke:#333333;stroke-width:0.5;" x1="80.5723" x2="90.5723" y1="159.8281" y2="141.2188"/>
283+
<polygon fill="#E2E2F0" points="86.3613,164.8281,112.3613,164.8281,124.3613,176.8281,112.3613,188.8281,86.3613,188.8281,74.3613,176.8281" style="stroke:#006400;stroke-width:1.5;"/>
284+
<polygon fill="#E2E2F0" points="136.3613,164.8281,474.3613,164.8281,474.3613,188.8281,136.3613,188.8281,124.3613,176.8281" style="stroke:#E2E2F0;stroke-width:1.5;"/>
285+
<path d="M474.3613,164.8281 L136.3613,164.8281 L124.3613,176.8281 L136.3613,188.8281 L474.3613,188.8281" fill="#E2E2F0" style="stroke:#006400;stroke-width:1.5;"/>
286+
<text fill="#333333" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="20.6719" x="89.0254" y="181.7383">Idle</text>
287+
<text fill="#333333" font-family="sans-serif" font-size="12" font-weight="bold" lengthAdjust="spacing" textLength="43.3242" x="136.3613" y="181.7383">Waiting</text>
288+
<line style="stroke:#333333;stroke-width:2;" x1="74.3613" x2="74.3613" y1="198.8281" y2="203.8281"/>
289+
<line style="stroke:#333333;stroke-width:2;" x1="124.3613" x2="124.3613" y1="198.8281" y2="203.8281"/>
290+
<line style="stroke:#333333;stroke-width:2;" x1="174.3613" x2="174.3613" y1="198.8281" y2="203.8281"/>
291+
<line style="stroke:#333333;stroke-width:2;" x1="224.3613" x2="224.3613" y1="198.8281" y2="203.8281"/>
292+
<line style="stroke:#333333;stroke-width:2;" x1="274.3613" x2="274.3613" y1="198.8281" y2="203.8281"/>
293+
<line style="stroke:#333333;stroke-width:2;" x1="324.3613" x2="324.3613" y1="198.8281" y2="203.8281"/>
294+
<line style="stroke:#333333;stroke-width:2;" x1="374.3613" x2="374.3613" y1="198.8281" y2="203.8281"/>
295+
<line style="stroke:#333333;stroke-width:2;" x1="424.3613" x2="424.3613" y1="198.8281" y2="203.8281"/>
296+
<line style="stroke:#333333;stroke-width:2;" x1="474.3613" x2="474.3613" y1="198.8281" y2="203.8281"/>
297+
<line style="stroke:#333333;stroke-width:2;" x1="74.3613" x2="474.3613" y1="198.8281" y2="198.8281"/>
298+
<text fill="#333333" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="6.1177" x="71.3025" y="216.2471">0</text>
299+
<text fill="#333333" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="18.353" x="115.1848" y="216.2471">100</text>
300+
<text fill="#333333" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="18.353" x="215.1848" y="216.2471">300</text>
301+
<text fill="#333333" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="18.353" x="265.1848" y="216.2471">400</text>
302+
<text fill="#333333" font-family="sans-serif" font-size="11" lengthAdjust="spacing" textLength="18.353" x="415.1848" y="216.2471">700</text>
303+
<line style="stroke:#00008B;stroke-width:1.5;" x1="124.3613" x2="124.3613" y1="176.8281" y2="129.2188"/>
304+
<polygon fill="#00008B" points="127.0975,136.7363,121.6252,136.7363,124.3613,129.2188" style="stroke:#00008B;stroke-width:1.5;"/>
305+
<text fill="#00008B" font-family="Serif" font-size="14" lengthAdjust="spacing" textLength="28" x="124.3613" y="151.4062">URL</text>
306+
<line style="stroke:#00008B;stroke-width:1.5;" x1="224.3613" x2="249.3613" y1="89.2188" y2="53.6094"/>
307+
<polygon fill="#00008B" points="247.2812,61.3342,242.8024,58.1898,249.3613,53.6094" style="stroke:#00008B;stroke-width:1.5;"/>
308+
<text fill="#00008B" font-family="Serif" font-size="14" lengthAdjust="spacing" textLength="76.6035" x="245.0418" y="74.4319">Resolve URL</text>
309+
<!--SRC=[NO_12i8m38RlUOgmwn2guiM3bE954959wNchGGfZXMRgwzlEED5Ro9V_-ziKkpkFMErF5so8O_-WL67Bc1UG13hgqAJuP67EW8-33qnlPcTW0RG2Pp4m7guzWJFpM2e-C-XwgQR3nIxhS8ksEKhEjM4CmqsYvnGzCPT53grAoFnTPKLswtgZiaS-CVcaHOf_JUilA2zw0G00]-->
310+
</g>
311+
</svg>
312+
</figure>
313+
<p>A paragraph following.</p>
314+
.
315+
Document[0, 87]
316+
Heading[0, 9] textOpen:[0, 1, "#"] text:[2, 9, "Heading"]
317+
Text[2, 9] chars:[2, 9, "Heading"]
318+
PlantUmlBlockNode[10, 85]
319+
Paragraph[125, 143]
320+
Text[125, 143] chars:[125, 143, "Anoth … raph."]
321+
````````````````````````````````
322+
207323
---
208324

209325
## PlantUML Fenced Code Block Node

0 commit comments

Comments
 (0)