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
This commit is contained in:
fiddlosopher 2007-12-08 19:32:18 +00:00
parent 1fa54ab190
commit aea6f6802b
14 changed files with 3 additions and 289 deletions

10
README
View file

@ -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
------------------------------------------

View file

@ -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

1
debian/changelog vendored
View file

@ -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.

View file

@ -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"]

View file

@ -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.
* * * *

View file

@ -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

View file

@ -124,46 +124,6 @@ sub status {
<para>
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>

View file

@ -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"

View file

@ -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}

View file

@ -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
* * * * *

View file

@ -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.

View file

@ -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"]

View file

@ -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.
--------------

View file

@ -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}