From 28328f1366db8bce39bd5a862f835d778b91d5ca Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 12 Apr 2018 17:42:06 +0200 Subject: 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. --- tests/note/buildfile | 5 ++++ tests/note/testscript | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 tests/note/buildfile create mode 100644 tests/note/testscript (limited to 'tests') 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 <=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 +

Leading paragraph.

+ +
+

This is a note block one.

+
+ +

Interleaving paragraph.

+ +
+

This is a note block two.

+
+ +

Trailing paragraph.

+ +EOO + +: block-multi-para +: +cat <=test.cli; +" +\N| +This is a note para one. + +This is a note para two. +| +" +EOI +$* --generate-html --stdout test.cli >>EOO +
+

This is a note para one.

+ +

This is a note para two.

+
+ +EOO + +: span-basics +: +cat <=test.cli; +" +This is normal text. \N{This is a note.} And this is normal text again. +" +EOI +$* --generate-html --stdout test.cli >>EOO +

This is normal text. This is a note. And this + is normal text again.

+ +EOO + +: span-nested-link +: +cat <=test.cli; +" +\N{This is a note with a \l{https://example.com link} inside.} +" +EOI +$* --generate-html --stdout test.cli >>EOO +

This is a note with a link inside.

+ +EOO -- cgit v1.1