diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-09-23 13:37:08 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-09-23 13:37:08 +0300 |
commit | 635a89b84aec6b0d12f635763e04b4836174f2b9 (patch) | |
tree | 237f845a5a81968547abdda5249129e0c6287e28 /riki.md | |
parent | 93fec8fb014fbd3c407a59d1340f0a72ecd39189 (diff) | |
download | riki-635a89b84aec6b0d12f635763e04b4836174f2b9.tar.gz |
feat: implement table directive
Sponsored-by: author
Diffstat (limited to 'riki.md')
-rw-r--r-- | riki.md | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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 |