diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-12 17:42:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-12 17:42:06 +0200 |
commit | 28328f1366db8bce39bd5a862f835d778b91d5ca (patch) | |
tree | 53bcf16350f0357575b4fa37e5de64f1e1c28671 /tests | |
parent | bffe74e67f69fb4ad928230e86ca776bd39ae432 (diff) |
Add support for note block and span
For example:
\N|This is a block note.
It may consist of multiple paragraphs.|
And this is \N{an inline note} that is inside a paragraph.
Notes are currently only support for the html output.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/note/buildfile | 5 | ||||
-rw-r--r-- | tests/note/testscript | 83 |
2 files changed, 88 insertions, 0 deletions
diff --git a/tests/note/buildfile b/tests/note/buildfile new file mode 100644 index 0000000..2051ed0 --- /dev/null +++ b/tests/note/buildfile @@ -0,0 +1,5 @@ +# file : tests/note/buildfile +# copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +./: test{testscript} diff --git a/tests/note/testscript b/tests/note/testscript new file mode 100644 index 0000000..1e302bd --- /dev/null +++ b/tests/note/testscript @@ -0,0 +1,83 @@ +# file : tests/note/testscript +# copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +test = $effect($cli.path) + +: block-basics +: +cat <<EOI >=test.cli; +" +Leading paragraph. + +\N|This is a note block one.| + +Interleaving paragraph. + +\N|This is a note block two.| + +Trailing paragraph. +" +EOI +$* --generate-html --stdout test.cli >>EOO + <p>Leading paragraph.</p> + + <div class="note"> + <p>This is a note block one.</p> + </div> + + <p>Interleaving paragraph.</p> + + <div class="note"> + <p>This is a note block two.</p> + </div> + + <p>Trailing paragraph.</p> + +EOO + +: block-multi-para +: +cat <<EOI >=test.cli; +" +\N| +This is a note para one. + +This is a note para two. +| +" +EOI +$* --generate-html --stdout test.cli >>EOO + <div class="note"> + <p>This is a note para one.</p> + + <p>This is a note para two.</p> + </div> + +EOO + +: span-basics +: +cat <<EOI >=test.cli; +" +This is normal text. \N{This is a note.} And this is normal text again. +" +EOI +$* --generate-html --stdout test.cli >>EOO + <p>This is normal text. <span class="note">This is a note.</span> And this + is normal text again.</p> + +EOO + +: span-nested-link +: +cat <<EOI >=test.cli; +" +\N{This is a note with a \l{https://example.com link} inside.} +" +EOI +$* --generate-html --stdout test.cli >>EOO + <p><span class="note">This is a note with a <a + href="https://example.com">link</a> inside.</span></p> + +EOO |