From 1ead1f39ad71086253ff6cb30d4462be642b4901 Mon Sep 17 00:00:00 2001 From: mb21 Date: Thu, 19 Nov 2015 15:57:24 +0100 Subject: ICML writer: intersperse line breaks instead of appending them to every ParagraphStyleRange closes #2501 --- tests/tables.icml | 221 +++++++------ tests/writer.icml | 965 ++++++++++++++++++++++++++++++++++++------------------ 2 files changed, 756 insertions(+), 430 deletions(-) (limited to 'tests') diff --git a/tests/tables.icml b/tests/tables.icml index edb022737..8ce645a2f 100644 --- a/tests/tables.icml +++ b/tests/tables.icml @@ -1,8 +1,9 @@ Simple table with caption: -
+
+
@@ -12,125 +13,127 @@ Right -
+
Left -
+
Center -
+
Default -
+
12 -
+
12 -
+
12 -
+
12 -
+
123 -
+
123 -
+
123 -
+
123 -
+
1 -
+
1 -
+
1 -
+
1 -
+
Demonstration of simple table syntax. -
+
+
Simple table without caption: -
+
+
@@ -140,123 +143,124 @@ Right -
+
Left -
+
Center -
+
Default -
+
12 -
+
12 -
+
12 -
+
12 -
+
123 -
+
123 -
+
123 -
+
123 -
+
1 -
+
1 -
+
1 -
+
1 -
+
-
+
Simple table indented two spaces: -
+
+
@@ -266,125 +270,127 @@ Right -
+
Left -
+
Center -
+
Default -
+
12 -
+
12 -
+
12 -
+
12 -
+
123 -
+
123 -
+
123 -
+
123 -
+
1 -
+
1 -
+
1 -
+
1 -
+
Demonstration of simple table syntax. -
+
+
Multiline table with caption: -
+
+
@@ -394,97 +400,99 @@ Centered Header -
+
Left Aligned -
+
Right Aligned -
+
Default aligned -
+
First -
+
row -
+
12.0 -
+
Example of a row that spans multiple lines. -
+
Second -
+
row -
+
5.0 -
+
Here's another one. Note the blank line between rows. -
+
Here's the caption. It may span multiple lines. -
+
+
Multiline table without caption: -
+
+
@@ -494,95 +502,96 @@ Centered Header -
+
Left Aligned -
+
Right Aligned -
+
Default aligned -
+
First -
+
row -
+
12.0 -
+
Example of a row that spans multiple lines. -
+
Second -
+
row -
+
5.0 -
+
Here's another one. Note the blank line between rows. -
+
-
+
Table without column headers: -
+
+
@@ -592,95 +601,96 @@ 12 -
+
12 -
+
12 -
+
12 -
+
123 -
+
123 -
+
123 -
+
123 -
+
1 -
+
1 -
+
1 -
+
1 -
+
-
+
Multiline table without column headers: -
+
+
@@ -690,59 +700,58 @@ First -
+
row -
+
12.0 -
+
Example of a row that spans multiple lines. -
+
Second -
+
row -
+
5.0 -
+
Here's another one. Note the blank line between rows. -
+
-
\ No newline at end of file diff --git a/tests/writer.icml b/tests/writer.icml index d3e37a06d..b498f568b 100644 --- a/tests/writer.icml +++ b/tests/writer.icml @@ -439,13 +439,15 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. -
+
+
Headers -
+
+
Level 2 with an @@ -454,79 +456,93 @@ embedded link -
+
+
Level 3 with emphasis -
+
+
Level 4 -
+
+
Level 5 -
+
+
Level 1 -
+
+
Level 2 with emphasis -
+
+
Level 3 -
+
+
with no blank line -
+
+
Level 2 -
+
+
with no blank line -
+
+
Paragraphs -
+
+
Here’s a regular paragraph. -
+
+
In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. -
+
+
Here’s one with a bullet. * criminey. -
+
+
There should be a hard line break @@ -536,85 +552,101 @@ here. -
+
+
Block Quotes -
+
+
E-mail style: -
+
+
This is a block quote. It is pretty short. -
+
+
Code in a block quote: -
+
+
sub status { print "working"; } -
+
+
A list: -
+
+
item one -
+
+
item two -
+
+
Nested block quotes: -
+
+
nested -
+
+
nested -
+
+
This should not be a block quote: 2 > 1. -
+
+
And a following paragraph. -
+
+
Code Blocks -
+
+
Code: -
+
+
---- (should be four hyphens) @@ -624,879 +656,1051 @@ sub status { } this code block is indented by one tab -
+
+
And: -
+
+
this code block is indented by two tabs These should not be escaped: \$ \\ \> \[ \{ -
+
+
Lists -
+
+
Unordered -
+
+
Asterisks tight: -
+
+
asterisk 1 -
+
+
asterisk 2 -
+
+
asterisk 3 -
+
+
Asterisks loose: -
+
+
asterisk 1 -
+
+
asterisk 2 -
+
+
asterisk 3 -
+
+
Pluses tight: -
+
+
Plus 1 -
+
+
Plus 2 -
+
+
Plus 3 -
+
+
Pluses loose: -
+
+
Plus 1 -
+
+
Plus 2 -
+
+
Plus 3 -
+
+
Minuses tight: -
+
+
Minus 1 -
+
+
Minus 2 -
+
+
Minus 3 -
+
+
Minuses loose: -
+
+
Minus 1 -
+
+
Minus 2 -
+
+
Minus 3 -
+
+
Ordered -
+
+
Tight: -
+
+
First -
+
+
Second -
+
+
Third -
+
+
and: -
+
+
One -
+
+
Two -
+
+
Three -
+
+
Loose using tabs: -
+
+
First -
+
+
Second -
+
+
Third -
+
+
and using spaces: -
+
+
One -
+
+
Two -
+
+
Three -
+
+
Multiple paragraphs: -
+
+
Item 1, graf one. -
+
+
Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. -
+
+
Item 2. -
+
+
Item 3. -
+
+
Nested -
+
+
Tab -
+
+
Tab -
+
+
Tab -
+
+
Here’s another: -
+
+
First -
+
+
Second: -
+
+
Fee -
+
+
Fie -
+
+
Foe -
+
+
Third -
+
+
Same thing but with paragraphs: -
+
+
First -
+
+
Second: -
+
+
Fee -
+
+
Fie -
+
+
Foe -
+
+
Third -
+
+
Tabs and spaces -
+
+
this is a list item indented with tabs -
+
+
this is a list item indented with spaces -
+
+
this is an example list item indented with tabs -
+
+
this is an example list item indented with spaces -
+
+
Fancy list markers -
+
+
begins with 2 -
+
+
and now 3 -
+
+
with a continuation -
+
+
sublist with roman numerals, starting with 4 -
+
+
more items -
+
+
a subsublist -
+
+
a subsublist -
+
+
Nesting: -
+
+
Upper Alpha -
+
+
Upper Roman. -
+
+
Decimal start with 6 -
+
+
Lower alpha with paren -
+
+
Autonumbering: -
+
+
Autonumber. -
+
+
More. -
+
+
Nested. -
+
+
Should not be a list item: -
+
+
M.A. 2007 -
+
+
B. Williams -
+
+
Definition Lists -
+
+
Tight using spaces: -
+
+
apple -
+
+
red fruit -
+
+
orange -
+
+
orange fruit -
+
+
banana -
+
+
yellow fruit -
+
+
Tight using tabs: -
+
+
apple -
+
+
red fruit -
+
+
orange -
+
+
orange fruit -
+
+
banana -
+
+
yellow fruit -
+
+
Loose: -
+
+
apple -
+
+
red fruit -
+
+
orange -
+
+
orange fruit -
+
+
banana -
+
+
yellow fruit -
+
+
Multiple blocks with italics: -
+
+
apple -
+
+
red fruit -
+
+
contains seeds, crisp, pleasant to taste -
+
+
orange -
+
+
orange fruit -
+
+
{ orange code block } -
+
+
orange block quote -
+
+
Multiple definitions, tight: -
+
+
apple -
+
+
red fruit -
+
+
computer -
+
+
orange -
+
+
orange fruit -
+
+
bank -
+
+
Multiple definitions, loose: -
+
+
apple -
+
+
red fruit -
+
+
computer -
+
+
orange -
+
+
orange fruit -
+
+
bank -
+
+
Blank line after term, indented marker, alternate markers: -
+
+
apple -
+
+
red fruit -
+
+
computer -
+
+
orange -
+
+
orange fruit -
+
+
sublist -
+
+
sublist -
+
+
HTML Blocks -
+
+
Simple block on one line: -
+
+
foo -
+
+
And nested without indentation: -
+
+
foo -
+
+
bar -
+
+
Interpreted markdown in a table: -
+
+
This is emphasized -
+
+
And this is strong -
+
+
Here’s a simple block: -
+
+
foo -
+
+
This should be a code block, though: -
+
+
<div> foo </div> -
+
+
As should this: -
+
+
<div>foo</div> -
+
+
Now, nested: -
+
+
foo -
+
+
This should just be an HTML comment: -
+
+
Multiline: -
+
+
Code block: -
+
+
<!-- Comment --> -
+
+
Just plain comment, with trailing spaces on the line: -
+
+
Code: -
+
+
<hr /> -
+
+
Hr’s: -
+
+
Inline Markup -
+
+
This is @@ -1512,8 +1716,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
This is @@ -1529,8 +1734,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
An @@ -1542,13 +1748,15 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
This is strong and em. -
+
+
So is @@ -1558,13 +1766,15 @@ These should not be escaped: \$ \\ \> \[ \{ word. -
+
+
This is strong and em. -
+
+
So is @@ -1574,8 +1784,9 @@ These should not be escaped: \$ \\ \> \[ \{ word. -
+
+
This is code: @@ -1609,8 +1820,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
This is @@ -1620,8 +1832,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Superscripts: a @@ -1643,8 +1856,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Subscripts: H @@ -1666,18 +1880,21 @@ These should not be escaped: \$ \\ \> \[ \{ O. -
+
+
These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. -
+
+
Smart quotes, ellipses, dashes -
+
+
@@ -1708,8 +1925,9 @@ These should not be escaped: \$ \\ \> \[ \{ -
+
+
@@ -1746,8 +1964,9 @@ These should not be escaped: \$ \\ \> \[ \{ are letters. -
+
+
@@ -1793,8 +2012,9 @@ These should not be escaped: \$ \\ \> \[ \{ -
+
+
@@ -1816,8 +2036,9 @@ These should not be escaped: \$ \\ \> \[ \{ Were you alive in the 70’s? -
+
+
Here is some quoted @@ -1847,31 +2068,36 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Some dashes: one—two — three—four — five. -
+
+
Dashes between numbers: 5–7, 255–66, 1987–1999. -
+
+
Ellipses…and…and…. -
+
+
LaTeX -
+
+
-
+
2 @@ -1891,8 +2117,9 @@ These should not be escaped: \$ \\ \> \[ \{ 4 -
+
+
x @@ -1904,8 +2131,9 @@ These should not be escaped: \$ \\ \> \[ \{ y -
+
+
α @@ -1917,29 +2145,33 @@ These should not be escaped: \$ \\ \> \[ \{ ω -
+
+
223 -
+
+
p -Tree -
+
+
Here’s some display math: $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ -
+
+
Here’s one that has a line break in it: @@ -1967,13 +2199,15 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
These shouldn’t be math: -
+
+
To get the famous equation, write @@ -1983,8 +2217,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
$22,000 is a @@ -2006,13 +2241,15 @@ These should not be escaped: \$ \\ \> \[ \{ is emphasized.) -
+
+
Shoes ($20) and socks ($5). -
+
+
Escaped @@ -2028,163 +2265,195 @@ These should not be escaped: \$ \\ \> \[ \{ 23$. -
+
+
Here’s a LaTeX table: -
+
+
Special Characters -
+
+
Here is some unicode: -
+
+
I hat: Î -
+
+
o umlaut: ö -
+
+
section: § -
+
+
set membership: ∈ -
+
+
copyright: © -
+
+
AT&T has an ampersand in their name. -
+
+
AT&T is another way to write it. -
+
+
This & that. -
+
+
4 < 5. -
+
+
6 > 5. -
+
+
Backslash: \ -
+
+
Backtick: ` -
+
+
Asterisk: * -
+
+
Underscore: _ -
+
+
Left brace: { -
+
+
Right brace: } -
+
+
Left bracket: [ -
+
+
Right bracket: ] -
+
+
Left paren: ( -
+
+
Right paren: ) -
+
+
Greater-than: > -
+
+
Hash: # -
+
+
Period: . -
+
+
Bang: ! -
+
+
Plus: + -
+
+
Minus: - -
+
+
Links -
+
+
Explicit -
+
+
Just a @@ -2196,8 +2465,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
. -
+
+
. -
+
+
. -
+
+

+
+

+
+

+
+

+
+
. -
+
+
Reference -
+
+
Foo @@ -2282,8 +2561,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Foo @@ -2295,8 +2575,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Foo @@ -2308,8 +2589,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
With @@ -2321,8 +2603,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
by itself should be a link. -
+
+
Indented @@ -2344,8 +2628,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Indented @@ -2357,8 +2642,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Indented @@ -2370,18 +2656,21 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
This should [not][] be a link. -
+
+
[not]: /url -
+
+
Foo @@ -2393,8 +2682,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Foo @@ -2406,13 +2696,15 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
With ampersands -
+
+
Here’s a @@ -2424,8 +2716,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Here’s a link with an amersand in the link text: @@ -2437,8 +2730,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Here’s an @@ -2450,8 +2744,9 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Here’s an @@ -2463,13 +2758,15 @@ These should not be escaped: \$ \\ \> \[ \{ . -
+
+
Autolinks -
+
+
With an ampersand: @@ -2478,25 +2775,29 @@ These should not be escaped: \$ \\ \> \[ \{ http://example.com/?foo=1&bar=2 -
+
+
In a list? -
+
+

+
+
It should. -
+
+
An e-mail address: @@ -2505,8 +2806,9 @@ These should not be escaped: \$ \\ \> \[ \{ nobody@nowhere.net -
+
+
Blockquoted: @@ -2515,26 +2817,30 @@ These should not be escaped: \$ \\ \> \[ \{ http://example.com/ -
+
+
Auto-links should not occur here: <http://example.com/> -
+
+
or here: <http://example.com/> -
+
+
Images -
+
+
From @@ -2550,8 +2856,9 @@ These should not be escaped: \$ \\ \> \[ \{ by Georges Melies (1902): -
+
+
@@ -2576,13 +2883,15 @@ These should not be escaped: \$ \\ \> \[ \{ -
+
+
lalune -
+
+
Here is a movie @@ -2613,13 +2922,15 @@ These should not be escaped: \$ \\ \> \[ \{ icon. -
+
+
Footnotes -
+
+
Here is a footnote reference, @@ -2637,7 +2948,7 @@ These should not be escaped: \$ \\ \> \[ \{ Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. -
+
@@ -2657,28 +2968,31 @@ These should not be escaped: \$ \\ \> \[ \{ Here’s the long note. This one contains multiple blocks. -
+ +
Subsequent blocks are indented to show that they belong to the footnote (as with list items). -
+
+
{ <code> } -
+
+
If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. -
+
@@ -2724,11 +3038,12 @@ These should not be escaped: \$ \\ \> \[ \{ verbatim characters, as well as [bracketed text]. -
+ -
+ +
Notes can go in quotes. @@ -2746,11 +3061,12 @@ These should not be escaped: \$ \\ \> \[ \{ In quote. -
+
-
+ +
And in list items. @@ -2768,15 +3084,16 @@ These should not be escaped: \$ \\ \> \[ \{ In list. -
+
-
+ +
This paragraph should not be part of the note, as it is not indented. -
+
-- cgit v1.2.3