From bdf23d3a5d621808bb96b6390fa77177daf3907a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 4 Feb 2011 23:25:28 -0800 Subject: Improved HTML table output (line breaks). --- tests/lhs-test.html | 9 +-- tests/lhs-test.html+lhs | 9 +-- tests/lhs-test.nohl.html | 28 ++++++++-- tests/lhs-test.nohl.html+lhs | 28 ++++++++-- tests/tables.html | 129 +++++++++++++++++++++++++++++++++---------- tests/writer.html | 28 +++++++--- 6 files changed, 170 insertions(+), 61 deletions(-) (limited to 'tests') diff --git a/tests/lhs-test.html b/tests/lhs-test.html index f7c9819b2..d1ea1f128 100644 --- a/tests/lhs-test.html +++ b/tests/lhs-test.html @@ -26,19 +26,14 @@ code.sourceCode span.er { color: red; font-weight: bold; }

lhs test

-

unsplit is an arrow that takes a pair of values and combines them to return a single value:

-
unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
unsplit = arr . uncurry
-- arr (\op (x,y) -> x `op` y)
-

(***) combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).

-
f *** g = first f >>> second g
 
-

Block quote:

-
-

foo bar

+

foo bar

+ diff --git a/tests/lhs-test.html+lhs b/tests/lhs-test.html+lhs index b5065ded0..269974eb4 100644 --- a/tests/lhs-test.html+lhs +++ b/tests/lhs-test.html+lhs @@ -26,19 +26,14 @@ code.sourceCode span.er { color: red; font-weight: bold; }

lhs test

-

unsplit is an arrow that takes a pair of values and combines them to return a single value:

-
> unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
> unsplit = arr . uncurry
> -- arr (\op (x,y) -> x `op` y)
-

(***) combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).

-
f *** g = first f >>> second g
 
-

Block quote:

-
-

foo bar

+

foo bar

+ diff --git a/tests/lhs-test.nohl.html b/tests/lhs-test.nohl.html index 2b5208408..d1ea1f128 100644 --- a/tests/lhs-test.nohl.html +++ b/tests/lhs-test.nohl.html @@ -4,18 +4,36 @@ +

lhs test

unsplit is an arrow that takes a pair of values and combines them to return a single value:

-
unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
-unsplit = arr . uncurry       
-          -- arr (\op (x,y) -> x `op` y) 
-
+
unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
unsplit = arr . uncurry
-- arr (\op (x,y) -> x `op` y)

(***) combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).

f *** g = first f >>> second g
 

Block quote:

-

foo bar

+
+

foo bar

+
diff --git a/tests/lhs-test.nohl.html+lhs b/tests/lhs-test.nohl.html+lhs index ef9967ec2..269974eb4 100644 --- a/tests/lhs-test.nohl.html+lhs +++ b/tests/lhs-test.nohl.html+lhs @@ -4,18 +4,36 @@ +

lhs test

unsplit is an arrow that takes a pair of values and combines them to return a single value:

-
> unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
-> unsplit = arr . uncurry       
->           -- arr (\op (x,y) -> x `op` y) 
-
+
> unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
> unsplit = arr . uncurry
> -- arr (\op (x,y) -> x `op` y)

(***) combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).

f *** g = first f >>> second g
 

Block quote:

-

foo bar

+
+

foo bar

+
diff --git a/tests/tables.html b/tests/tables.html index 8f06c5832..b72aa784e 100644 --- a/tests/tables.html +++ b/tests/tables.html @@ -1,129 +1,198 @@

Simple table with caption:

- +
Demonstration of simple table syntax.
Right
+ + + + - + + + + - + + - + + -
Demonstration of simple table syntax.
Right Left Center Default
12
12 12 12 12
123
123 123 123 123
1
1 1 1 1
+ +

Simple table without caption:

- +
Right
+ + + - + + + + - + + - + + -
Right Left Center Default
12
12 12 12 12
123
123 123 123 123
1
1 1 1 1
+ +

Simple table indented two spaces:

- +
Demonstration of simple table syntax.
Right
+ + + + - + + + + - + + - + + -
Demonstration of simple table syntax.
Right Left Center Default
12
12 12 12 12
123
123 123 123 123
1
1 1 1 1
+ +

Multiline table with caption:

- +
Here's the caption. It may span multiple lines.
Centered Header
+ +++++ + + - + + + + - + + -
Here's the caption. It may span multiple lines.
Centered Header Left Aligned Right Aligned Default aligned
First
First row 12.0 Example of a row that spans multiple lines.
Second
Second row 5.0 Here's another one. Note the blank line between rows.
+ +

Multiline table without caption:

- +
Centered Header
+++++ + + - + + + + - + + -
Centered Header Left Aligned Right Aligned Default aligned
First
First row 12.0 Example of a row that spans multiple lines.
Second
Second row 5.0 Here's another one. Note the blank line between rows.
+ +

Table without column headers:

- +
12
+ + + - + + - + + -
12 12 12 12
123
123 123 123 123
1
1 1 1 1
+ +

Multiline table without column headers:

- +
First
+++++ + + - + + -
First row 12.0 Example of a row that spans multiple lines.
Second
Second row 5.0 Here's another one. Note the blank line between rows.
+ + diff --git a/tests/writer.html b/tests/writer.html index 6724fc97e..371e8e17a 100644 --- a/tests/writer.html +++ b/tests/writer.html @@ -32,8 +32,11 @@

Block Quotes

E-mail style:

-

This is a block quote. It is pretty short.

-

Code in a block quote:

+
+

This is a block quote. It is pretty short.

+
+
+

Code in a block quote:

sub status {
     print "working";
 }
@@ -44,8 +47,13 @@
 
  • item two
  • Nested block quotes:

    -

    nested

    -

    nested

    +
    +

    nested

    +
    +
    +

    nested

    +
    +

    This should not be a block quote: 2 > 1.

    And a following paragraph.


    @@ -262,7 +270,9 @@ These should not be escaped: \$ \\ \> \[ \{

    orange fruit

    { orange code block }
     
    -

    orange block quote

    +
    +

    orange block quote

    +

    Multiple definitions, tight:

    @@ -523,7 +533,9 @@ h='nowhere.net';a='@'; document.write(''+''+e+''+'<\/'+'a'+'>'); // -->

    -

    Blockquoted: http://example.com/

    +
    +

    Blockquoted: http://example.com/

    +

    Auto-links should not occur here: <http://example.com/>

    or here: <http://example.com/>
     
    @@ -537,7 +549,9 @@ document.write(''+''+e+''+'<\/'+

    Footnotes

    Here is a footnote reference,1 and another.2 This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.3

    -

    Notes can go in quotes.4

    +
    +

    Notes can go in quotes.4

    +
    1. And in list items.5
    -- cgit v1.2.3