From 7bdf38ef2eb39e552a0825436dc8bdfa5507e245 Mon Sep 17 00:00:00 2001
From: Václav Haisman
Date: Tue, 9 May 2017 22:09:10 +0200
Subject: LaTeX: Load `parskip` before `hyperref`. (#3654)
* LaTeX: Load `parskip` before `hyperref`.
According to `hyperref` package's `README.pdf`, page 22, `hyperref` package
should be loaded after `parskip` package.
* Adjust tests for previous change.
---
test/writer.latex | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'test/writer.latex')
diff --git a/test/writer.latex b/test/writer.latex
index f88621a28..ab5e5e724 100644
--- a/test/writer.latex
+++ b/test/writer.latex
@@ -17,6 +17,12 @@
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
+\IfFileExists{parskip.sty}{%
+\usepackage{parskip}
+}{% else
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{6pt plus 2pt minus 1pt}
+}
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
\usepackage{fancyvrb}
\usepackage[unicode=true]{hyperref}
@@ -39,12 +45,6 @@
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
-\IfFileExists{parskip.sty}{%
-\usepackage{parskip}
-}{% else
-\setlength{\parindent}{0pt}
-\setlength{\parskip}{6pt plus 2pt minus 1pt}
-}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
--
cgit v1.2.3
From 708973a33a0ce425bb21a5ffa06fbdab465d3fb8 Mon Sep 17 00:00:00 2001
From: John MacFarlane
Date: Thu, 25 May 2017 12:50:43 +0200
Subject: Added `spaced_reference_links` extension.
This is now the default for pandoc's Markdown.
It allows whitespace between the two parts of a
reference link: e.g.
[a] [b]
[b]: url
This is now forbidden by default.
Closes #2602.
---
MANUAL.txt | 10 +-
src/Text/Pandoc/Extensions.hs | 6 +-
src/Text/Pandoc/Readers/Markdown.hs | 8 +-
test/command/2602.md | 18 +
test/testsuite.native | 2 -
test/testsuite.txt | 11 +-
test/writer.asciidoc | 4 -
test/writer.context | 40 +-
test/writer.docbook4 | 6 -
test/writer.docbook5 | 6 -
test/writer.dokuwiki | 4 -
test/writer.fb2 | 1014 ++++++++++++++++++++++++++++++++++-
test/writer.haddock | 4 -
test/writer.html4 | 2 -
test/writer.html5 | 2 -
test/writer.icml | 102 ++--
test/writer.jats | 6 -
test/writer.latex | 4 -
test/writer.man | 4 -
test/writer.markdown | 4 -
test/writer.mediawiki | 4 -
test/writer.ms | 10 -
test/writer.muse | 4 -
test/writer.native | 2 -
test/writer.opendocument | 4 -
test/writer.opml | 2 +-
test/writer.org | 4 -
test/writer.plain | 4 -
test/writer.rst | 4 -
test/writer.rtf | 8 -
test/writer.tei | 2 -
test/writer.texinfo | 4 -
test/writer.textile | 4 -
test/writer.zimwiki | 4 -
34 files changed, 1101 insertions(+), 216 deletions(-)
create mode 100644 test/command/2602.md
(limited to 'test/writer.latex')
diff --git a/MANUAL.txt b/MANUAL.txt
index 170af0d6f..2cd35d14d 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -3100,7 +3100,8 @@ definition, which may occur elsewhere in the document (either
before or after the link).
The link consists of link text in square brackets, followed by a label in
-square brackets. (There can be space between the two.) The link definition
+square brackets. (There cannot be space between the two unless the
+`spaced_reference_links` extension is enabled.) The link definition
consists of the bracketed label, followed by a colon and a space, followed by
the URL, and optionally (after a space) a link title either in quotes or in
parentheses. The label must not be parseable as a citation (assuming
@@ -3551,6 +3552,13 @@ implied by pandoc's default `all_symbols_escapable`.
Allow a list to occur right after a paragraph, with no intervening
blank space.
+#### Extension: `spaced_reference_links` ####
+
+Allow whitespace between the two components of a reference link,
+for example,
+
+ [foo] [bar].
+
#### Extension: `hard_line_breaks` ####
Causes all newlines within a paragraph to be interpreted as hard line
diff --git a/src/Text/Pandoc/Extensions.hs b/src/Text/Pandoc/Extensions.hs
index 374fae2c1..58e8c414d 100644
--- a/src/Text/Pandoc/Extensions.hs
+++ b/src/Text/Pandoc/Extensions.hs
@@ -137,6 +137,7 @@ data Extension =
| Ext_shortcut_reference_links -- ^ Shortcut reference links
| Ext_smart -- ^ "Smart" quotes, apostrophes, ellipses, dashes
| Ext_old_dashes -- ^ -- = em, - before number = en
+ | Ext_spaced_reference_links -- ^ Allow space between two parts of ref link
deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable, Generic)
-- | Extensions to be used with pandoc-flavored markdown.
@@ -187,7 +188,7 @@ pandocExtensions = extensionsFromList
, Ext_smart
]
--- | Extensions to be used with github-flavored markdown.
+-- | Extensions to be used with plain text output.
plainExtensions :: Extensions
plainExtensions = extensionsFromList
[ Ext_table_captions
@@ -220,6 +221,7 @@ phpMarkdownExtraExtensions = extensionsFromList
, Ext_link_attributes
, Ext_abbreviations
, Ext_shortcut_reference_links
+ , Ext_spaced_reference_links
]
-- | Extensions to be used with github-flavored markdown.
@@ -272,6 +274,7 @@ multimarkdownExtensions = extensionsFromList
, Ext_superscript
, Ext_subscript
, Ext_backtick_code_blocks
+ , Ext_spaced_reference_links
]
-- | Language extensions to be used with strict markdown.
@@ -279,6 +282,7 @@ strictExtensions :: Extensions
strictExtensions = extensionsFromList
[ Ext_raw_html
, Ext_shortcut_reference_links
+ , Ext_spaced_reference_links
]
-- | Default extensions from format-describing string.
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 11f35deb2..4fb75b344 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1750,10 +1750,12 @@ referenceLink :: PandocMonad m
referenceLink constructor (lab, raw) = do
sp <- (True <$ lookAhead (char ' ')) <|> return False
(_,raw') <- option (mempty, "") $
- lookAhead (try (guardEnabled Ext_citations >>
- spnl >> normalCite >> return (mempty, "")))
+ lookAhead (try (do guardEnabled Ext_citations
+ guardDisabled Ext_spaced_reference_links <|> spnl
+ normalCite
+ return (mempty, "")))
<|>
- try (spnl >> reference)
+ try ((guardDisabled Ext_spaced_reference_links <|> spnl) >> reference)
when (raw' == "") $ guardEnabled Ext_shortcut_reference_links
let labIsRef = raw' == "" || raw' == "[]"
let key = toKey $ if labIsRef then raw else raw'
diff --git a/test/command/2602.md b/test/command/2602.md
new file mode 100644
index 000000000..5ed4b581c
--- /dev/null
+++ b/test/command/2602.md
@@ -0,0 +1,18 @@
+```
+% pandoc
+[a] [b]
+
+[b]: url
+^D
+
+```
+
diff --git a/test/testsuite.native b/test/testsuite.native
index fa234dfc2..0587bddb8 100644
--- a/test/testsuite.native
+++ b/test/testsuite.native
@@ -369,8 +369,6 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
,Header 2 ("reference",[],[]) [Str "Reference"]
,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
diff --git a/test/testsuite.txt b/test/testsuite.txt
index f6b0a7c95..9413cc81a 100644
--- a/test/testsuite.txt
+++ b/test/testsuite.txt
@@ -621,16 +621,11 @@ Just a [URL](/url/).
## Reference
-Foo [bar] [a].
-
Foo [bar][a].
-Foo [bar]
-[a].
-
[a]: /url/
-With [embedded [brackets]] [b].
+With [embedded [brackets]][b].
[b] by itself should be a link.
@@ -659,9 +654,9 @@ Foo [biz](/url/ "Title with "quote" inside").
## With ampersands
-Here's a [link with an ampersand in the URL] [1].
+Here's a [link with an ampersand in the URL][1].
-Here's a link with an amersand in the link text: [AT&T] [2].
+Here's a link with an amersand in the link text: [AT&T][2].
Here's an [inline link](/script?foo=1&bar=2).
diff --git a/test/writer.asciidoc b/test/writer.asciidoc
index 2bf62e36f..639663743 100644
--- a/test/writer.asciidoc
+++ b/test/writer.asciidoc
@@ -600,10 +600,6 @@ Reference
Foo link:/url/[bar].
-Foo link:/url/[bar].
-
-Foo link:/url/[bar].
-
With link:/url/[embedded [brackets]].
link:/url/[b] by itself should be a link.
diff --git a/test/writer.context b/test/writer.context
index eafc56f2a..9884c82c9 100644
--- a/test/writer.context
+++ b/test/writer.context
@@ -787,19 +787,15 @@ Just a \useURL[url4][/url/][][URL]\from[url4].
Foo \useURL[url13][/url/][][bar]\from[url13].
-Foo \useURL[url14][/url/][][bar]\from[url14].
+With \useURL[url14][/url/][][embedded {[}brackets{]}]\from[url14].
-Foo \useURL[url15][/url/][][bar]\from[url15].
+\useURL[url15][/url/][][b]\from[url15] by itself should be a link.
-With \useURL[url16][/url/][][embedded {[}brackets{]}]\from[url16].
+Indented \useURL[url16][/url][][once]\from[url16].
-\useURL[url17][/url/][][b]\from[url17] by itself should be a link.
+Indented \useURL[url17][/url][][twice]\from[url17].
-Indented \useURL[url18][/url][][once]\from[url18].
-
-Indented \useURL[url19][/url][][twice]\from[url19].
-
-Indented \useURL[url20][/url][][thrice]\from[url20].
+Indented \useURL[url18][/url][][thrice]\from[url18].
This should {[}not{]}{[}{]} be a link.
@@ -807,41 +803,41 @@ This should {[}not{]}{[}{]} be a link.
[not]: /url
\stoptyping
-Foo \useURL[url21][/url/][][bar]\from[url21].
+Foo \useURL[url19][/url/][][bar]\from[url19].
-Foo \useURL[url22][/url/][][biz]\from[url22].
+Foo \useURL[url20][/url/][][biz]\from[url20].
\subsection[with-ampersands]{With ampersands}
-Here's a \useURL[url23][http://example.com/?foo=1&bar=2][][link with an
-ampersand in the URL]\from[url23].
+Here's a \useURL[url21][http://example.com/?foo=1&bar=2][][link with an
+ampersand in the URL]\from[url21].
Here's a link with an amersand in the link text:
-\useURL[url24][http://att.com/][][AT&T]\from[url24].
+\useURL[url22][http://att.com/][][AT&T]\from[url22].
-Here's an \useURL[url25][/script?foo=1&bar=2][][inline link]\from[url25].
+Here's an \useURL[url23][/script?foo=1&bar=2][][inline link]\from[url23].
-Here's an \useURL[url26][/script?foo=1&bar=2][][inline link in pointy
-braces]\from[url26].
+Here's an \useURL[url24][/script?foo=1&bar=2][][inline link in pointy
+braces]\from[url24].
\subsection[autolinks]{Autolinks}
-With an ampersand: \useURL[url27][http://example.com/?foo=1&bar=2]\from[url27]
+With an ampersand: \useURL[url25][http://example.com/?foo=1&bar=2]\from[url25]
\startitemize[packed]
\item
In a list?
\item
- \useURL[url28][http://example.com/]\from[url28]
+ \useURL[url26][http://example.com/]\from[url26]
\item
It should.
\stopitemize
An e-mail address:
-\useURL[url29][mailto:nobody@nowhere.net][][nobody@nowhere.net]\from[url29]
+\useURL[url27][mailto:nobody@nowhere.net][][nobody@nowhere.net]\from[url27]
\startblockquote
-Blockquoted: \useURL[url30][http://example.com/]\from[url30]
+Blockquoted: \useURL[url28][http://example.com/]\from[url28]
\stopblockquote
Auto-links should not occur here: \type{}
@@ -880,7 +876,7 @@ Here is a footnote reference,\footnote{Here is the footnote. It can go
indent the first line of each block.\stopbuffer\footnote{\getbuffer} This
should {\em not} be a footnote reference, because it contains a space.{[}^my
note{]} Here is an inline note.\footnote{This is {\em easier} to type. Inline
- notes may contain \useURL[url31][http://google.com][][links]\from[url31] and
+ notes may contain \useURL[url29][http://google.com][][links]\from[url29] and
\type{]} verbatim characters, as well as {[}bracketed text{]}.}
\startblockquote
diff --git a/test/writer.docbook4 b/test/writer.docbook4
index eee19cdd9..163255974 100644
--- a/test/writer.docbook4
+++ b/test/writer.docbook4
@@ -1248,12 +1248,6 @@ These should not be escaped: \$ \\ \> \[ \{
Foo bar.
-
- Foo bar.
-
-
- Foo bar.
-
With embedded [brackets].
diff --git a/test/writer.docbook5 b/test/writer.docbook5
index 07ca0f827..992cd8b63 100644
--- a/test/writer.docbook5
+++ b/test/writer.docbook5
@@ -1223,12 +1223,6 @@ These should not be escaped: \$ \\ \> \[ \{
Foo bar.
-
- Foo bar.
-
-
- Foo bar.
-
With embedded [brackets].
diff --git a/test/writer.dokuwiki b/test/writer.dokuwiki
index 79fcdde8a..4ba1b7054 100644
--- a/test/writer.dokuwiki
+++ b/test/writer.dokuwiki
@@ -556,10 +556,6 @@ Just a [[url/|URL]].
Foo [[url/|bar]].
-Foo [[url/|bar]].
-
-Foo [[url/|bar]].
-
With [[url/|embedded [brackets]]].
[[url/|b]] by itself should be a link.
diff --git a/test/writer.fb2 b/test/writer.fb2
index 0412c8cf4..63d0bdfbf 100644
--- a/test/writer.fb2
+++ b/test/writer.fb2
@@ -1,3 +1,1013 @@
-Pandoc Test SuiteJohnMacFarlaneAnonymousJuly 17, 2006pandoc
Pandoc Test Suite
John MacFarlane
Anonymous
July 17, 2006
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 embedded link </url>
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 breakhere.
——————————
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:
1. item one
2. 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)
sub status {
print "working";
}
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:
1. First
2. Second
3. Third
and:
1. One
2. Two
3. Three
Loose using tabs:
1. First
2. Second
3. Third
and using spaces:
1. One
2. Two
3. Three
Multiple paragraphs:
1. Item 1, graf one.Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
2. Item 2.
3. Item 3.
Nested
• Tab
◦ Tab
* Tab
Here’s another:
1. First
2. Second:
• Fee
• Fie
• Foe
3. Third
Same thing but with paragraphs:
1. First
2. Second:
• Fee
• Fie
• Foe
3. 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
(2) begins with 2
(3) and now 3with a continuation
(3) iv. sublist with roman numerals, starting with 4
(3) v. more items
(3) v. (A) a subsublist
(3) v. (B) a subsublist
Nesting:
A. Upper Alpha
A. I. Upper Roman.
A. I. (6) Decimal start with 6
A. I. (6) c) Lower alpha with paren
Autonumbering:
1. Autonumber.
2. More.
2. 1. 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
1. sublist
2. sublist
HTML Blocks
Simple block on one line:
foo
And nested without indentation:
foo
bar
Interpreted markdown in a table:
This is emphasizedAnd 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:
Auto-links should not occur here: <http://example.com/>
or here: <http://example.com/>
——————————
Images
From “Voyage dans la Lune” by Georges Melies (1902):
Here is a movie icon.
——————————
Footnotes
Here is a footnote reference,[30] and another.[31] This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.[32]
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 embedded link </url>
+
+
+
+
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 breakhere.
+
+
——————————
+
+
+
+
+
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:
+
1. item one
+
2. 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)
+
+
+
+
+
+
+sub status {
+
+
+ print "working";
+
+
+}
+
+
+
+
+
+
+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:
+
1. First
+
2. Second
+
3. Third
+
and:
+
1. One
+
2. Two
+
3. Three
+
Loose using tabs:
+
1. First
+
+
2. Second
+
+
3. Third
+
+
and using spaces:
+
1. One
+
+
2. Two
+
+
3. Three
+
+
Multiple paragraphs:
+
1. Item 1, graf one.Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
+
+
2. Item 2.
+
+
3. Item 3.
+
+
+
+
+
Nested
+
+
• Tab
◦ Tab
* Tab
+
+
+
Here’s another:
+
1. First
+
2. Second:
• Fee
+
• Fie
+
• Foe
+
+
3. Third
+
Same thing but with paragraphs:
+
1. First
+
+
2. Second:
+
• Fee
+
• Fie
+
• Foe
+
+
3. 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
+
+
(2) begins with 2
+
(3) and now 3with a continuation
+
(3) iv. sublist with roman numerals, starting with 4
+
(3) v. more items
(3) v. (A) a subsublist
+
(3) v. (B) a subsublist
+
+
+
Nesting:
+
A. Upper Alpha
A. I. Upper Roman.
A. I. (6) Decimal start with 6
A. I. (6) c) Lower alpha with paren
+
+
+
+
Autonumbering:
+
1. Autonumber.
+
2. More.
2. 1. 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
+
1. sublist
+
2. sublist
+
+
+
+
+
HTML Blocks
+
+
Simple block on one line:
foo
And nested without indentation:
+
foo
bar
Interpreted markdown in a table:
This is emphasizedAnd 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:
Auto-links should not occur here: <http://example.com/>
+
+
+
+or here: <http://example.com/>
+
+
+
+
——————————
+
+
+
+
+
+
Images
+
+
From “Voyage dans la Lune” by Georges Melies (1902):
+
+
Here is a movie icon.
+
+
——————————
+
+
+
+
+
Footnotes
+
+
Here is a footnote reference,
+[28]
+ and another.
+[29]
+ This should not be a footnote reference, because it contains a space.[^my note] Here is an inline note.
+[30]
+
+
diff --git a/test/writer.icml b/test/writer.icml
index b498f568b..c39915120 100644
--- a/test/writer.icml
+++ b/test/writer.icml
@@ -2564,39 +2564,11 @@ These should not be escaped: \$ \\ \> \[ \{
-
-
- Foo
-
-
-
- bar
-
-
-
- .
-
-
-
-
-
- Foo
-
-
-
- bar
-
-
-
- .
-
-
- With
-
+ embedded [brackets]
@@ -2607,7 +2579,7 @@ These should not be escaped: \$ \\ \> \[ \{
-
+ b
@@ -2621,7 +2593,7 @@ These should not be escaped: \$ \\ \> \[ \{
Indented
-
+ once
@@ -2635,7 +2607,7 @@ These should not be escaped: \$ \\ \> \[ \{
Indented
-
+ twice
@@ -2649,7 +2621,7 @@ These should not be escaped: \$ \\ \> \[ \{
Indented
-
+ thrice
@@ -2675,7 +2647,7 @@ These should not be escaped: \$ \\ \> \[ \{
Foo
-
+ bar
@@ -2689,7 +2661,7 @@ These should not be escaped: \$ \\ \> \[ \{
Foo
-
+ biz
@@ -2709,7 +2681,7 @@ These should not be escaped: \$ \\ \> \[ \{
Here’s a
-
+ link with an ampersand in the URL
@@ -2723,7 +2695,7 @@ These should not be escaped: \$ \\ \> \[ \{
Here’s a link with an amersand in the link text:
-
+ AT&T
@@ -2737,7 +2709,7 @@ These should not be escaped: \$ \\ \> \[ \{
Here’s an
-
+ inline link
@@ -2751,7 +2723,7 @@ These should not be escaped: \$ \\ \> \[ \{
Here’s an
-
+ inline link in pointy braces
@@ -2771,7 +2743,7 @@ These should not be escaped: \$ \\ \> \[ \{
With an ampersand:
-
+ http://example.com/?foo=1&bar=2
@@ -2785,7 +2757,7 @@ These should not be escaped: \$ \\ \> \[ \{
-
+ http://example.com/
@@ -2802,7 +2774,7 @@ These should not be escaped: \$ \\ \> \[ \{
An e-mail address:
-
+ nobody@nowhere.net
@@ -2813,7 +2785,7 @@ These should not be escaped: \$ \\ \> \[ \{
Blockquoted:
-
+ http://example.com/
@@ -3025,7 +2997,7 @@ These should not be escaped: \$ \\ \> \[ \{
to type. Inline notes may contain
-
+ links
@@ -3098,118 +3070,104 @@ These should not be escaped: \$ \\ \> \[ \{
-
+ BlackHyperlinkURLDestination/http%3a//google.com
-
+ BlackHyperlinkURLDestination/http%3a//example.com/
-
+ BlackHyperlinkURLDestination/mailto%3anobody@nowhere.net
-
+ BlackHyperlinkURLDestination/http%3a//example.com/
-
+ BlackHyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2
-
+ BlackHyperlinkURLDestination//script?foo=1&bar=2
-
+ BlackHyperlinkURLDestination//script?foo=1&bar=2
-
+ BlackHyperlinkURLDestination/http%3a//att.com/
-
+ BlackHyperlinkURLDestination/http%3a//example.com/?foo=1&bar=2
-
+ BlackHyperlinkURLDestination//url/
-
+ BlackHyperlinkURLDestination//url/
-
+ BlackHyperlinkURLDestination//url
-
+ BlackHyperlinkURLDestination//url
-
+ BlackHyperlinkURLDestination//url
-
-
- Black
- HyperlinkURLDestination//url/
-
-
-
-
-
- Black
- HyperlinkURLDestination//url/
-
-
- Black
diff --git a/test/writer.jats b/test/writer.jats
index 07fe24d73..3cb5050c2 100644
--- a/test/writer.jats
+++ b/test/writer.jats
@@ -1266,12 +1266,6 @@ These should not be escaped: \$ \\ \> \[ \{
Foo bar.
-
- Foo bar.
-
-
- Foo bar.
-
With embedded
[brackets].
diff --git a/test/writer.latex b/test/writer.latex
index ab5e5e724..207e30569 100644
--- a/test/writer.latex
+++ b/test/writer.latex
@@ -877,10 +877,6 @@ Just a \href{/url/}{URL}.
Foo \href{/url/}{bar}.
-Foo \href{/url/}{bar}.
-
-Foo \href{/url/}{bar}.
-
With \href{/url/}{embedded {[}brackets{]}}.
\href{/url/}{b} by itself should be a link.
diff --git a/test/writer.man b/test/writer.man
index 907fb4878..f6d0deb92 100644
--- a/test/writer.man
+++ b/test/writer.man
@@ -677,10 +677,6 @@ Empty ().
.PP
Foo bar (/url/).
.PP
-Foo bar (/url/).
-.PP
-Foo bar (/url/).
-.PP
With embedded [brackets] (/url/).
.PP
b (/url/) by itself should be a link.
diff --git a/test/writer.markdown b/test/writer.markdown
index 3fe0f4b3e..d41030785 100644
--- a/test/writer.markdown
+++ b/test/writer.markdown
@@ -647,10 +647,6 @@ Reference
Foo [bar](/url/).
-Foo [bar](/url/).
-
-Foo [bar](/url/).
-
With [embedded \[brackets\]](/url/).
[b](/url/) by itself should be a link.
diff --git a/test/writer.mediawiki b/test/writer.mediawiki
index a0dc15fae..968eef388 100644
--- a/test/writer.mediawiki
+++ b/test/writer.mediawiki
@@ -571,10 +571,6 @@ Just a [[url/|URL]].
Foo [[url/|bar]].
-Foo [[url/|bar]].
-
-Foo [[url/|bar]].
-
With [[url/|embedded [brackets]]].
[[url/|b]] by itself should be a link.
diff --git a/test/writer.ms b/test/writer.ms
index 617ccc752..7e079c55d 100644
--- a/test/writer.ms
+++ b/test/writer.ms
@@ -835,16 +835,6 @@ Foo \c
-- "bar"
\&.
.PP
-Foo \c
-.pdfhref W -D "/url/" -A "\c" \
- -- "bar"
-\&.
-.PP
-Foo \c
-.pdfhref W -D "/url/" -A "\c" \
- -- "bar"
-\&.
-.PP
With \c
.pdfhref W -D "/url/" -A "\c" \
-- "embedded [brackets]"
diff --git a/test/writer.muse b/test/writer.muse
index 73f1cf604..41d1c9a5b 100644
--- a/test/writer.muse
+++ b/test/writer.muse
@@ -625,10 +625,6 @@ Just a [[/url/][URL]].
Foo [[/url/][bar]].
-Foo [[/url/][bar]].
-
-Foo [[/url/][bar]].
-
With [[/url/][embedded [brackets]]].
[[/url/][b]] by itself should be a link.
diff --git a/test/writer.native b/test/writer.native
index fa234dfc2..0587bddb8 100644
--- a/test/writer.native
+++ b/test/writer.native
@@ -369,8 +369,6 @@ Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Spa
,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
,Header 2 ("reference",[],[]) [Str "Reference"]
,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
diff --git a/test/writer.opendocument b/test/writer.opendocument
index 86d88ee27..77c79d13c 100644
--- a/test/writer.opendocument
+++ b/test/writer.opendocument
@@ -1434,10 +1434,6 @@ link
ReferenceFoo
bar.
-Foo
-bar.
-Foo
-bar.With
embedded
[brackets].
diff --git a/test/writer.opml b/test/writer.opml
index 51b0cb2d5..4e67652d2 100644
--- a/test/writer.opml
+++ b/test/writer.opml
@@ -57,7 +57,7 @@
-
+
diff --git a/test/writer.org b/test/writer.org
index 96db87449..1ae0ca8f3 100644
--- a/test/writer.org
+++ b/test/writer.org
@@ -737,10 +737,6 @@ Just a [[/url/][URL]].
Foo [[/url/][bar]].
-Foo [[/url/][bar]].
-
-Foo [[/url/][bar]].
-
With [[/url/][embedded [brackets]]].
[[/url/][b]] by itself should be a link.
diff --git a/test/writer.plain b/test/writer.plain
index 175efb608..031c4a3e6 100644
--- a/test/writer.plain
+++ b/test/writer.plain
@@ -594,10 +594,6 @@ Reference
Foo bar.
-Foo bar.
-
-Foo bar.
-
With embedded [brackets].
b by itself should be a link.
diff --git a/test/writer.rst b/test/writer.rst
index 1b2f6d1e9..e81e79f3f 100644
--- a/test/writer.rst
+++ b/test/writer.rst
@@ -783,10 +783,6 @@ Reference
Foo `bar `__.
-Foo `bar `__.
-
-Foo `bar `__.
-
With `embedded [brackets] `__.
`b `__ by itself should be a link.
diff --git a/test/writer.rtf b/test/writer.rtf
index a79ae6fb5..c67c67a83 100644
--- a/test/writer.rtf
+++ b/test/writer.rtf
@@ -350,14 +350,6 @@ Empty
bar
}}}
.\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul
-bar
-}}}
-.\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul
-bar
-}}}
-.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 With {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul
embedded [brackets]
}}}
diff --git a/test/writer.tei b/test/writer.tei
index 986240c86..ecbe92e33 100644
--- a/test/writer.tei
+++ b/test/writer.tei
@@ -754,8 +754,6 @@ These should not be escaped: \$ \\ \> \[ \{
Reference
Foo bar.
-
Foo bar.
-
Foo bar.
With embedded [brackets].
b by itself should be a link.
Indented once.
diff --git a/test/writer.texinfo b/test/writer.texinfo
index ca87da1a9..f5727d96d 100644
--- a/test/writer.texinfo
+++ b/test/writer.texinfo
@@ -939,10 +939,6 @@ Just a @uref{/url/,URL}.
@anchor{#reference}
Foo @uref{/url/,bar}.
-Foo @uref{/url/,bar}.
-
-Foo @uref{/url/,bar}.
-
With @uref{/url/,embedded [brackets]}.
@uref{/url/,b} by itself should be a link.
diff --git a/test/writer.textile b/test/writer.textile
index 293418ed5..d19b698f9 100644
--- a/test/writer.textile
+++ b/test/writer.textile
@@ -623,10 +623,6 @@ h2(#reference). Reference
Foo "bar":/url/.
-Foo "bar":/url/.
-
-Foo "bar":/url/.
-
With "embedded [brackets]":/url/.
"b":/url/ by itself should be a link.
diff --git a/test/writer.zimwiki b/test/writer.zimwiki
index 7a15bad9d..91f018b52 100644
--- a/test/writer.zimwiki
+++ b/test/writer.zimwiki
@@ -538,10 +538,6 @@ Just a [[url/|URL]].
Foo [[url/|bar]].
-Foo [[url/|bar]].
-
-Foo [[url/|bar]].
-
With [[url/|embedded [brackets]]].
[[url/|b]] by itself should be a link.
--
cgit v1.2.3