Skip to content

Commit 75def32

Browse files
author
arshinsikka
committed
feat(test-site): add tricky rendering cases for table, diagrams, plugins
1 parent b434884 commit 75def32

File tree

8 files changed

+158
-0
lines changed

8 files changed

+158
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"title": "Tricky Site",
3+
"pages": [
4+
"index.md",
5+
"tricky-table-rendering.md",
6+
"mermaid-flowchart.md",
7+
"plantuml-diagrams.md",
8+
"shorthand-syntax.md",
9+
"tree-syntax.md",
10+
"auto-anchors.md"
11+
]
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<frontmatter title="Auto Anchors" />
2+
3+
# Auto Anchor Test
4+
5+
<box type="info">
6+
This tests if anchor icons are auto-added to headings by the plugin.
7+
</box>
8+
9+
## Level 2 Heading
10+
### Level 3 Heading
11+
#### Level 4 Heading
12+
13+
Note: These headings should get the anchor icons if IDs are assigned automatically.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<frontmatter title="Tricky Cases Test Site" />
2+
3+
# Tricky Cases Test Site
4+
5+
Welcome to the test site for rendering tricky and corner cases in MarkBind.
6+
7+
Use this site to quickly verify if previously buggy components are rendering as expected.
8+
9+
## Pages
10+
11+
- [Tricky Table Rendering](tricky-table-rendering.md)
12+
- [Mermaid Flowchart](mermaid-flowchart.md)
13+
- [PlantUML Diagrams](plantuml-diagrams.md)
14+
- [Shorthand Syntax](shorthand-syntax.md)
15+
- [Tree Syntax](tree-syntax.md)
16+
- [Auto Anchors](auto-anchors.md)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<frontmatter title="Mermaid Flowchart" />
2+
3+
# Mermaid Rendering Test
4+
5+
<box type="info">
6+
This page demonstrates if &lt;mermaid&gt; blocks are correctly converted and rendered.
7+
</box>
8+
9+
<mermaid>
10+
flowchart TD
11+
A[Start] --> B{Is it?}
12+
B -->|Yes| C[OK]
13+
C --> D[Rethink]
14+
D --> B
15+
B ---->|No| E[End]
16+
</mermaid>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<frontmatter title="PlantUML Diagrams" />
2+
3+
# PlantUML Rendering Test
4+
5+
<box type="info">
6+
This page shows how PlantUML plugin handles inline and external diagrams.
7+
</box>
8+
9+
## Inline Diagram
10+
<puml width=300>
11+
@startuml
12+
Alice -> Bob : Hello
13+
Bob -> Bob : Self Call
14+
@enduml
15+
</puml>
16+
17+
## Named Diagram
18+
<puml name="alice">
19+
@startuml
20+
Alice -> Bob : Hello again
21+
@enduml
22+
</puml>
23+
24+
## Referenced External Diagram (simulated)
25+
<puml src="activity.puml" />
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<frontmatter title="Shorthand Syntax" />
2+
3+
# Shorthand Syntax Handling
4+
5+
<box type="info">
6+
This tests if &lt;span heading&gt; is auto-converted by the plugin.
7+
</box>
8+
9+
## Case 1: Valid Shorthand Inside Panel
10+
<panel><span heading>Heading</span></panel>
11+
12+
## Case 2: Invalid Use (No Attribute)
13+
<panel><span>Heading</span></panel>
14+
15+
## Case 3: Wrong Container
16+
<div><span heading>Should not convert</span></div>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<frontmatter title="Tree Syntax" />
2+
3+
# Tree Syntax Plugin Test
4+
5+
<box type="info">
6+
This tests rendering of directory-like structures using the &lt;tree&gt; component.
7+
</box>
8+
9+
<tree>
10+
C:/course/
11+
textbook/
12+
index.md
13+
C:/course/
14+
textbook/
15+
index.md
16+
</tree>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<frontmatter title="Table Rendering" />
2+
3+
# Table Rendering: Tbody Variants
4+
5+
<box type="info">
6+
This page tests how MarkBind renders tables with and without &lt;tbody&gt; tags.
7+
</box>
8+
9+
<panel header="Correct Table (With &lt;tbody&gt;)">
10+
<table>
11+
<tbody>
12+
<tr>
13+
<td>Planning for next version</td>
14+
</tr>
15+
</tbody>
16+
</table>
17+
</panel>
18+
19+
<panel header="Table Without &lt;tbody&gt;">
20+
<table>
21+
<tr>
22+
<td>Planning for next version</td>
23+
</tr>
24+
</table>
25+
</panel>
26+
27+
<panel header="Full Table with Headers + Tbody">
28+
<table>
29+
<tbody>
30+
<tr>
31+
<th>Task ID</th>
32+
<th>Task</th>
33+
<th>Estimated Effort</th>
34+
<th>Prerequisite Task</th>
35+
</tr>
36+
<tr>
37+
<td>E</td>
38+
<td>Planning for next version</td>
39+
<td>1 man day</td>
40+
<td>D</td>
41+
</tr>
42+
</tbody>
43+
</table>
44+
</panel>

0 commit comments

Comments
 (0)