summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-08 19:32:18 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-08 19:32:18 +0000
commitaea6f6802b5c11e59063cc209b2b08ff9f58ee6f (patch)
treef7b9bbe5c97147f42586d558e217dad5d014143b
parent1fa54ab190cf4cc288c44703c581f214106a5d1e (diff)
Removed support for "box-style" block quotes in markdown.
This adds unneeded complexity and makes pandoc diverge further than necessary from other markdown extensions. Brought documentation, tests, and debian/changelog up to date. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1141 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--README10
-rw-r--r--Text/Pandoc/Readers/Markdown.hs14
-rw-r--r--debian/changelog1
-rw-r--r--tests/testsuite.native14
-rw-r--r--tests/testsuite.txt25
-rw-r--r--tests/writer.context35
-rw-r--r--tests/writer.docbook40
-rw-r--r--tests/writer.html31
-rw-r--r--tests/writer.latex29
-rw-r--r--tests/writer.man28
-rw-r--r--tests/writer.markdown17
-rw-r--r--tests/writer.native14
-rw-r--r--tests/writer.rst24
-rw-r--r--tests/writer.rtf10
14 files changed, 3 insertions, 289 deletions
diff --git a/README b/README
index ec4a5ea97..a8fd9e673 100644
--- a/README
+++ b/README
@@ -813,16 +813,6 @@ another. A link to this section, for example, might look like this:
Note, however, that this method of providing links to sections works
only in HTML.
-Box-style blockquotes
----------------------
-
-Pandoc supports emacs-style boxquote block quotes, in addition to
-standard markdown (email-style) block quotes:
-
- ,----
- | They look like this.
- `----
-
Blank lines before headers and blockquotes
------------------------------------------
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs
index 75b9ad134..38129d4b7 100644
--- a/Text/Pandoc/Readers/Markdown.hs
+++ b/Text/Pandoc/Readers/Markdown.hs
@@ -296,16 +296,6 @@ codeBlock = do
-- block quotes
--
-emacsBoxQuote = try $ do
- failIfStrict
- string ",----"
- manyTill anyChar newline
- raw <- manyTill
- (try (char '|' >> optional (char ' ') >> manyTill anyChar newline))
- (try (string "`----"))
- blanklines
- return raw
-
emailBlockQuoteStart = try $ nonindentSpaces >> char '>' >>~ optional (char ' ')
emailBlockQuote = try $ do
@@ -319,7 +309,7 @@ emailBlockQuote = try $ do
return raw
blockQuote = do
- raw <- emailBlockQuote <|> emacsBoxQuote
+ raw <- emailBlockQuote
-- parse the extracted block, which may contain various block elements:
contents <- parseFromString parseBlocks $ (joinWithSep "\n" raw) ++ "\n\n"
return $ BlockQuote contents
@@ -465,7 +455,7 @@ para = try $ do
blanklines <|> do st <- getState
if stateStrict st
then lookAhead (blockQuote <|> header) >> return ""
- else lookAhead emacsBoxQuote >> return ""
+ else pzero
return $ Para $ normalizeSpaces result
plain = many1 inline >>= return . Plain . normalizeSpaces
diff --git a/debian/changelog b/debian/changelog
index 8946bb2dd..11a9b0278 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,7 @@ pandoc (0.45) unstable; urgency=low
* Markdown reader:
+ + Removed support for box-style block quotes.
+ Require space before title in links and references.
This fixes a bug in parsing URLs like http://silly/url(withparen).
+ Improved and simplified setextHeader parser.
diff --git a/tests/testsuite.native b/tests/testsuite.native
index da7929861..f5de004eb 100644
--- a/tests/testsuite.native
+++ b/tests/testsuite.native
@@ -39,20 +39,6 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
[ Para [Str "nested"] ]
]
, Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1",Str "."]
-, Para [Str "Box",Str "-",Str "style:"]
-, BlockQuote
- [ Para [Str "Example:"]
- , CodeBlock "sub status {\n print \"working\";\n}" ]
-, BlockQuote
- [ OrderedList (1,Decimal,Period)
- [ [ Plain [Str "do",Space,Str "laundry"] ]
- , [ Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ]
-, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
-, BlockQuote
- [ Para [Str "Joe",Space,Str "said:"]
- , BlockQuote
- [ Para [Str "Don",Apostrophe,Str "t",Space,Str "quote",Space,Str "me",Str "."] ]
- ]
, Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph",Str "."]
, HorizontalRule
, Header 1 [Str "Code",Space,Str "Blocks"]
diff --git a/tests/testsuite.txt b/tests/testsuite.txt
index ae2d0fe32..dc5340021 100644
--- a/tests/testsuite.txt
+++ b/tests/testsuite.txt
@@ -78,31 +78,6 @@ E-mail style:
This should not be a block quote: 2
> 1.
-Box-style:
-
-,----
-| Example:
-|
-| sub status {
-| print "working";
-| }
-`----
-
-,----
-| 1. do laundry
-| 2. take out the trash
-`----
-
-Here's a nested one:
-
-,----
-| Joe said:
-|
-| ,----
-| | Don't quote me.
-| `----
-`----
-
And a following paragraph.
* * * *
diff --git a/tests/writer.context b/tests/writer.context
index 306143f14..a944b2822 100644
--- a/tests/writer.context
+++ b/tests/writer.context
@@ -159,41 +159,6 @@ nested
\stopblockquote
This should not be a block quote: 2 \lettermore{} 1.
-Box-style:
-
-\startblockquote
-
-Example:
-
-\starttyping
-sub status {
- print "working";
-}
-\stoptyping
-
-\stopblockquote
-\startblockquote
-
-\startitemize[n][stopper=.]
-\item
- do laundry
-\item
- take out the trash
-\stopitemize
-
-\stopblockquote
-Here's a nested one:
-
-\startblockquote
-
-Joe said:
-
-\startblockquote
-
-Don't quote me.
-
-\stopblockquote
-\stopblockquote
And a following paragraph.
\thinrule
diff --git a/tests/writer.docbook b/tests/writer.docbook
index 16486925f..458f8a252 100644
--- a/tests/writer.docbook
+++ b/tests/writer.docbook
@@ -125,46 +125,6 @@ sub status {
This should not be a block quote: 2 &gt; 1.
</para>
<para>
- Box-style:
- </para>
- <blockquote>
- <para>
- Example:
- </para>
- <screen>
-sub status {
- print &quot;working&quot;;
-}
-</screen>
- </blockquote>
- <blockquote>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- do laundry
- </para>
- </listitem>
- <listitem>
- <para>
- take out the trash
- </para>
- </listitem>
- </orderedlist>
- </blockquote>
- <para>
- Here's a nested one:
- </para>
- <blockquote>
- <para>
- Joe said:
- </para>
- <blockquote>
- <para>
- Don't quote me.
- </para>
- </blockquote>
- </blockquote>
- <para>
And a following paragraph.
</para>
</section>
diff --git a/tests/writer.html b/tests/writer.html
index 44a4b3335..890ce258c 100644
--- a/tests/writer.html
+++ b/tests/writer.html
@@ -105,37 +105,6 @@ ol.upper-roman { list-style-type: upper-roman; }
><p
>This should not be a block quote: 2 &gt; 1.</p
><p
- >Box-style:</p
- ><blockquote
- ><p
- >Example:</p
- ><pre
- ><code
- >sub status {
- print &quot;working&quot;;
-}
-</code
- ></pre
- ></blockquote
- ><blockquote
- ><ol class="decimal"
- ><li
- >do laundry</li
- ><li
- >take out the trash</li
- ></ol
- ></blockquote
- ><p
- >Here&rsquo;s a nested one:</p
- ><blockquote
- ><p
- >Joe said:</p
- ><blockquote
- ><p
- >Don&rsquo;t quote me.</p
- ></blockquote
- ></blockquote
- ><p
>And a following paragraph.</p
><hr
/><h1 id="code-blocks"
diff --git a/tests/writer.latex b/tests/writer.latex
index 0d19d6296..4c9f2187e 100644
--- a/tests/writer.latex
+++ b/tests/writer.latex
@@ -100,35 +100,6 @@ nested
\end{quote}
This should not be a block quote: 2 \textgreater{} 1.
-Box-style:
-
-\begin{quote}
-Example:
-
-\begin{verbatim}
-sub status {
- print "working";
-}
-\end{verbatim}
-\end{quote}
-\begin{quote}
-\begin{enumerate}[1.]
-\item
- do laundry
-\item
- take out the trash
-\end{enumerate}
-\end{quote}
-Here's a nested one:
-
-\begin{quote}
-Joe said:
-
-\begin{quote}
-Don't quote me.
-
-\end{quote}
-\end{quote}
And a following paragraph.
\begin{center}\rule{3in}{0.4pt}\end{center}
diff --git a/tests/writer.man b/tests/writer.man
index 13ae18927..1ccb27ff7 100644
--- a/tests/writer.man
+++ b/tests/writer.man
@@ -72,34 +72,6 @@ nested
.PP
This should not be a block quote: 2 > 1\.
.PP
-Box-style:
-.RS
-.PP
-Example:
-.PP
-\f[CR]
- sub\ status\ {
- \ \ \ \ print\ \"working\";
- }
-\f[]
-.RE
-.RS
-.IP "1." 3
-do laundry
-.IP "2." 3
-take out the trash
-.RE
-.PP
-Here's a nested one:
-.RS
-.PP
-Joe said:
-.RS
-.PP
-Don't quote me\.
-.RE
-.RE
-.PP
And a following paragraph\.
.PP
* * * * *
diff --git a/tests/writer.markdown b/tests/writer.markdown
index ba31d524d..2d8266cde 100644
--- a/tests/writer.markdown
+++ b/tests/writer.markdown
@@ -74,23 +74,6 @@ E-mail style:
This should not be a block quote: 2 > 1.
-Box-style:
-
-> Example:
->
-> sub status {
-> print "working";
-> }
-
-> 1. do laundry
-> 2. take out the trash
-
-Here's a nested one:
-
-> Joe said:
->
-> > Don't quote me.
-
And a following paragraph.
diff --git a/tests/writer.native b/tests/writer.native
index da7929861..f5de004eb 100644
--- a/tests/writer.native
+++ b/tests/writer.native
@@ -39,20 +39,6 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
[ Para [Str "nested"] ]
]
, Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1",Str "."]
-, Para [Str "Box",Str "-",Str "style:"]
-, BlockQuote
- [ Para [Str "Example:"]
- , CodeBlock "sub status {\n print \"working\";\n}" ]
-, BlockQuote
- [ OrderedList (1,Decimal,Period)
- [ [ Plain [Str "do",Space,Str "laundry"] ]
- , [ Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ]
-, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
-, BlockQuote
- [ Para [Str "Joe",Space,Str "said:"]
- , BlockQuote
- [ Para [Str "Don",Apostrophe,Str "t",Space,Str "quote",Space,Str "me",Str "."] ]
- ]
, Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph",Str "."]
, HorizontalRule
, Header 1 [Str "Code",Space,Str "Blocks"]
diff --git a/tests/writer.rst b/tests/writer.rst
index e0815de8b..2b44bd257 100644
--- a/tests/writer.rst
+++ b/tests/writer.rst
@@ -93,30 +93,6 @@ E-mail style:
This should not be a block quote: 2 > 1.
-Box-style:
-
- Example:
-
- ::
-
- sub status {
- print "working";
- }
-
-
-
- 1. do laundry
- 2. take out the trash
-
-
-Here's a nested one:
-
- Joe said:
-
- Don't quote me.
-
-
-
And a following paragraph.
--------------
diff --git a/tests/writer.rtf b/tests/writer.rtf
index f6c11b355..f25303256 100644
--- a/tests/writer.rtf
+++ b/tests/writer.rtf
@@ -43,16 +43,6 @@ embedded link
{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par}
{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par}
{\pard \ql \f0 \sa180 \li0 \fi0 This should not be a block quote: 2 > 1.\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 Box-style:\par}
-{\pard \ql \f0 \sa180 \li720 \fi0 Example:\par}
-{\pard \ql \f0 \sa180 \li720 \fi0 \f1 sub status \{\line
- print "working";\line
-\}\par}
-{\pard \ql \f0 \sa0 \li1080 \fi-360 1.\tx360\tab do laundry\par}
-{\pard \ql \f0 \sa0 \li1080 \fi-360 2.\tx360\tab take out the trash\sa180\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a nested one:\par}
-{\pard \ql \f0 \sa180 \li720 \fi0 Joe said:\par}
-{\pard \ql \f0 \sa180 \li1440 \fi0 Don\u8217't quote me.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 And a following paragraph.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Code Blocks\par}