From aea6f6802b5c11e59063cc209b2b08ff9f58ee6f Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 8 Dec 2007 19:32:18 +0000 Subject: 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 --- README | 10 ---------- Text/Pandoc/Readers/Markdown.hs | 14 ++------------ debian/changelog | 1 + tests/testsuite.native | 14 -------------- tests/testsuite.txt | 25 ------------------------- tests/writer.context | 35 ----------------------------------- tests/writer.docbook | 40 ---------------------------------------- tests/writer.html | 31 ------------------------------- tests/writer.latex | 29 ----------------------------- tests/writer.man | 28 ---------------------------- tests/writer.markdown | 17 ----------------- tests/writer.native | 14 -------------- tests/writer.rst | 24 ------------------------ tests/writer.rtf | 10 ---------- 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 @@ -124,46 +124,6 @@ sub status { This should not be a block quote: 2 > 1. - - Box-style: - -
- - Example: - - -sub status { - print "working"; -} - -
-
- - - - do laundry - - - - - take out the trash - - - -
- - Here's a nested one: - -
- - Joe said: - -
- - Don't quote me. - -
-
And a following paragraph. 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; } >

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.


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} -- cgit v1.2.3