summaryrefslogtreecommitdiff
path: root/riki.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-09-23 13:37:08 +0300
committerLars Wirzenius <liw@liw.fi>2022-09-23 13:37:08 +0300
commit635a89b84aec6b0d12f635763e04b4836174f2b9 (patch)
tree237f845a5a81968547abdda5249129e0c6287e28 /riki.md
parent93fec8fb014fbd3c407a59d1340f0a72ecd39189 (diff)
downloadriki-635a89b84aec6b0d12f635763e04b4836174f2b9.tar.gz
feat: implement table directive
Sponsored-by: author
Diffstat (limited to 'riki.md')
-rw-r--r--riki.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/riki.md b/riki.md
index de4e08a..b7551e1 100644
--- a/riki.md
+++ b/riki.md
@@ -569,6 +569,32 @@ then file output/a/index.html contains "<a href="https://example.com/foo/123">fo
[[!shortcut name="foo" url="https://example.com/foo/%s" desc="foo!%s"]]
~~~
+### `table`
+
+_Requirement: the `table` directive creates a simple table._
+
+~~~scenario
+given an installed riki
+given file site/index.mdwn from table
+when I run riki build site output
+when I run cat output/index.html
+then file output/index.html contains "<table>"
+then file output/index.html contains "<th><td>Greeting</td>"
+then file output/index.html contains "<td>Greetee</td>"
+then file output/index.html contains "<tr><td>hello</td>"
+then file output/index.html contains "<td>world</td>"
+then file output/index.html contains "<tr><td>goodbye</td>"
+then file output/index.html contains "<td>cruel world</td>"
+~~~
+
+~~~{#table .file .markdown}
+[[!table data="""
+Greeting | Greetee
+hello | world
+goodbye | cruel world
+"""]]
+~~~
+
## Source file tree
### Listing source files