|
188 | 188 |
|
189 | 189 | This --- be ___markdown___.") |
190 | 190 |
|
| 191 | +(def adoc-content |
| 192 | + "= Hello there |
| 193 | +
|
| 194 | +This --- be _asciidoc_.") |
| 195 | + |
191 | 196 | (def input-strings (map #(str "---\n" % "\n---\n" md-content) yamls)) |
192 | 197 |
|
| 198 | +(def adoc-input-strings (map #(str "---\n" % "\n---\n" adoc-content) yamls)) |
| 199 | + |
193 | 200 | (def parsed-md-basic "<h1><a href=\"#hello-there\" id=\"hello-there\"></a>Hello there</h1>\n<p>This --- be <strong><em>markdown</em></strong>.</p>\n") |
194 | 201 |
|
195 | 202 | (def parsed-pandoc-basic "<h1 id=\"hello-there\">Hello there</h1>\n<p>This --- be <strong><em>markdown</em></strong>.</p>\n") |
196 | 203 |
|
| 204 | +(def parsed-asciidoctor-md "<div class=\"paragraph\">\n<p>This --- be <em><em>markdown</em></em>.</p>\n</div>") |
| 205 | + |
| 206 | +(def parsed-asciidoctor-adoc "<div class=\"paragraph\">\n<p>This --- be <em>asciidoc</em>.</p>\n</div>") |
| 207 | + |
197 | 208 | (def parsed-md-smarts "<h1><a href=\"#hello-there\" id=\"hello-there\"></a>Hello there</h1>\n<p>This — be <strong><em>markdown</em></strong>.</p>\n") |
198 | 209 |
|
199 | 210 | (def js-content "(function somejs() { console.log('$foo'); })();") |
@@ -246,6 +257,20 @@ This --- be ___markdown___.") |
246 | 257 | :content parsed-pandoc-basic |
247 | 258 | :msg "`pandoc` should populate HTML file with parsed content")) |
248 | 259 |
|
| 260 | + (add-txt-file :path "2017-01-01-test.adoc" :content (nth input-strings 0)) |
| 261 | + (p/asciidoctor) |
| 262 | + (testing "asciidoctor for markdown" |
| 263 | + (content-check :path (perun/url-to-path "public/2017-01-01-test.html") |
| 264 | + :content parsed-asciidoctor-md |
| 265 | + :msg "`asciidoctor` should populate HTML file with parsed markdown content")) |
| 266 | + |
| 267 | + (add-txt-file :path "2017-01-01-test.adoc" :content (nth adoc-input-strings 0)) |
| 268 | + (p/asciidoctor) |
| 269 | + (testing "asciidoctor for asciidoc" |
| 270 | + (content-check :path (perun/url-to-path "public/2017-01-01-test.html") |
| 271 | + :content parsed-asciidoctor-adoc |
| 272 | + :msg "`asciidoctor` should populate HTML file with parsed asciidoc content")) |
| 273 | + |
249 | 274 | (add-txt-file :path "2017-01-01-test.md" :content (nth input-strings 0)) |
250 | 275 | (p/markdown) |
251 | 276 |
|
@@ -399,6 +424,26 @@ This --- be ___markdown___.") |
399 | 424 | :content "Hello there\n===========\n\nThis --- be ***markdown***.\n" |
400 | 425 | :msg "`pandoc` should parse HTML to markdown")) |
401 | 426 |
|
| 427 | + (add-txt-file :path "test.md" :content (nth input-strings 0)) |
| 428 | + (p/asciidoctor :out-dir nil |
| 429 | + :filterer #(= (:path %) "test.md") |
| 430 | + :extensions [".md"] |
| 431 | + :meta {:asciidoctor-set :metadata}) |
| 432 | + (testing "asciidoctor for markdown" |
| 433 | + (content-check :path "test.html" |
| 434 | + :content parsed-asciidoctor-md |
| 435 | + :msg "`asciidoctor` should populate HTML with parsed markdown content")) |
| 436 | + |
| 437 | + (add-txt-file :path "test.adoc" :content (nth adoc-input-strings 0)) |
| 438 | + (p/asciidoctor :out-dir nil |
| 439 | + :filterer #(= (:path %) "test.adoc") |
| 440 | + :extensions [".adoc"] |
| 441 | + :meta {:asciidoctor-set :metadata}) |
| 442 | + (testing "asciidoctor for asciidoc" |
| 443 | + (content-check :path "test.html" |
| 444 | + :content parsed-asciidoctor-adoc |
| 445 | + :msg "`asciidoctor` should populate HTML with parsed asciidoc content")) |
| 446 | + |
402 | 447 | (add-txt-file :path "test.md" :content (nth input-strings 0)) |
403 | 448 | (p/markdown :out-dir "hammock" |
404 | 449 | :filterer #(= (:path %) "test.md") |
|
0 commit comments