git.iko.soy/typeable/pandoc
on master help sign in
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

commitaea6f6802b5c11e59063cc209b2b08ff9f58ee6f authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 8 Dec 2007, 19:32 (19 years ago) parent1fa54ab
14 files changed+3−289
README−10 Text/Pandoc/Readers/Markdown.hs+2−12 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
README−10
@@ -813,16 +813,6 @@ another. A link to this section, for example, might look like this:
813813Note, however, that this method of providing links to sections works
814814only in HTML.
815815
816−Box-style blockquotes
817−---------------------
818−
819−Pandoc supports emacs-style boxquote block quotes, in addition to
820−standard markdown (email-style) block quotes:
821−
822− ,----
823− | They look like this.
824− `----
825−
826816Blank lines before headers and blockquotes
827817------------------------------------------
828818
Text/Pandoc/Readers/Markdown.hs+2−12
@@ -296,16 +296,6 @@ codeBlock = do
296296-- block quotes
297297--
298298
299−emacsBoxQuote = try $ do
300− failIfStrict
301− string ",----"
302− manyTill anyChar newline
303− raw <- manyTill
304− (try (char '|' >> optional (char ' ') >> manyTill anyChar newline))
305− (try (string "`----"))
306− blanklines
307− return raw
308−
309299emailBlockQuoteStart = try $ nonindentSpaces >> char '>' >>~ optional (char ' ')
310300
311301emailBlockQuote = try $ do
@@ -319,7 +309,7 @@ emailBlockQuote = try $ do
319309 return raw
320310
321311blockQuote = do
322− raw <- emailBlockQuote <|> emacsBoxQuote
312+ raw <- emailBlockQuote
323313 -- parse the extracted block, which may contain various block elements:
324314 contents <- parseFromString parseBlocks $ (joinWithSep "\n" raw) ++ "\n\n"
325315 return $ BlockQuote contents
@@ -465,7 +455,7 @@ para = try $ do
465455 blanklines <|> do st <- getState
466456 if stateStrict st
467457 then lookAhead (blockQuote <|> header) >> return ""
468− else lookAhead emacsBoxQuote >> return ""
458+ else pzero
469459 return $ Para $ normalizeSpaces result
470460
471461plain = many1 inline >>= return . Plain . normalizeSpaces
debian/changelog+1
@@ -60,6 +60,7 @@ pandoc (0.45) unstable; urgency=low
6060
6161 * Markdown reader:
6262
63+ + Removed support for box-style block quotes.
6364 + Require space before title in links and references.
6465 This fixes a bug in parsing URLs like http://silly/url(withparen).
6566 + Improved and simplified setextHeader parser.
tests/testsuite.native−14
@@ -39,20 +39,6 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
3939 [ Para [Str "nested"] ]
4040 ]
4141, 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 "."]
42−, Para [Str "Box",Str "-",Str "style:"]
43−, BlockQuote
44− [ Para [Str "Example:"]
45− , CodeBlock "sub status {\n print \"working\";\n}" ]
46−, BlockQuote
47− [ OrderedList (1,Decimal,Period)
48− [ [ Plain [Str "do",Space,Str "laundry"] ]
49− , [ Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ]
50−, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
51−, BlockQuote
52− [ Para [Str "Joe",Space,Str "said:"]
53− , BlockQuote
54− [ Para [Str "Don",Apostrophe,Str "t",Space,Str "quote",Space,Str "me",Str "."] ]
55− ]
5642, Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph",Str "."]
5743, HorizontalRule
5844, Header 1 [Str "Code",Space,Str "Blocks"]
tests/testsuite.txt−25
@@ -78,31 +78,6 @@ E-mail style:
7878This should not be a block quote: 2
7979> 1.
8080
81−Box-style:
82−
83−,----
84−| Example:
85−|
86−| sub status {
87−| print "working";
88−| }
89−`----
90−
91−,----
92−| 1. do laundry
93−| 2. take out the trash
94−`----
95−
96−Here's a nested one:
97−
98−,----
99−| Joe said:
100−|
101−| ,----
102−| | Don't quote me.
103−| `----
104−`----
105−
10681And a following paragraph.
10782
10883* * * *
tests/writer.context−35
@@ -159,41 +159,6 @@ nested
159159\stopblockquote
160160This should not be a block quote: 2 \lettermore{} 1.
161161
162−Box-style:
163−
164−\startblockquote
165−
166−Example:
167−
168−\starttyping
169−sub status {
170− print "working";
171−}
172−\stoptyping
173−
174−\stopblockquote
175−\startblockquote
176−
177−\startitemize[n][stopper=.]
178−\item
179− do laundry
180−\item
181− take out the trash
182−\stopitemize
183−
184−\stopblockquote
185−Here's a nested one:
186−
187−\startblockquote
188−
189−Joe said:
190−
191−\startblockquote
192−
193−Don't quote me.
194−
195−\stopblockquote
196−\stopblockquote
197162And a following paragraph.
198163
199164\thinrule
tests/writer.docbook−40
@@ -124,46 +124,6 @@ sub status {
124124 <para>
125125 This should not be a block quote: 2 &gt; 1.
126126 </para>
127− <para>
128− Box-style:
129− </para>
130− <blockquote>
131− <para>
132− Example:
133− </para>
134− <screen>
135−sub status {
136− print &quot;working&quot;;
137−}
138−</screen>
139− </blockquote>
140− <blockquote>
141− <orderedlist numeration="arabic">
142− <listitem>
143− <para>
144− do laundry
145− </para>
146− </listitem>
147− <listitem>
148− <para>
149− take out the trash
150− </para>
151− </listitem>
152− </orderedlist>
153− </blockquote>
154− <para>
155− Here's a nested one:
156− </para>
157− <blockquote>
158− <para>
159− Joe said:
160− </para>
161− <blockquote>
162− <para>
163− Don't quote me.
164− </para>
165− </blockquote>
166− </blockquote>
167127 <para>
168128 And a following paragraph.
169129 </para>
tests/writer.html−31
@@ -105,37 +105,6 @@ ol.upper-roman { list-style-type: upper-roman; }
105105 ><p
106106 >This should not be a block quote: 2 &gt; 1.</p
107107 ><p
108− >Box-style:</p
109− ><blockquote
110− ><p
111− >Example:</p
112− ><pre
113− ><code
114− >sub status {
115− print &quot;working&quot;;
116−}
117−</code
118− ></pre
119− ></blockquote
120− ><blockquote
121− ><ol class="decimal"
122− ><li
123− >do laundry</li
124− ><li
125− >take out the trash</li
126− ></ol
127− ></blockquote
128− ><p
129− >Here&rsquo;s a nested one:</p
130− ><blockquote
131− ><p
132− >Joe said:</p
133− ><blockquote
134− ><p
135− >Don&rsquo;t quote me.</p
136− ></blockquote
137− ></blockquote
138− ><p
139108 >And a following paragraph.</p
140109 ><hr
141110 /><h1 id="code-blocks"
tests/writer.latex−29
@@ -100,35 +100,6 @@ nested
100100\end{quote}
101101This should not be a block quote: 2 \textgreater{} 1.
102102
103−Box-style:
104−
105−\begin{quote}
106−Example:
107−
108−\begin{verbatim}
109−sub status {
110− print "working";
111−}
112−\end{verbatim}
113−\end{quote}
114−\begin{quote}
115−\begin{enumerate}[1.]
116−\item
117− do laundry
118−\item
119− take out the trash
120−\end{enumerate}
121−\end{quote}
122−Here's a nested one:
123−
124−\begin{quote}
125−Joe said:
126−
127−\begin{quote}
128−Don't quote me.
129−
130−\end{quote}
131−\end{quote}
132103And a following paragraph.
133104
134105\begin{center}\rule{3in}{0.4pt}\end{center}
tests/writer.man−28
@@ -72,34 +72,6 @@ nested
7272.PP
7373This should not be a block quote: 2 > 1\.
7474.PP
75−Box-style:
76−.RS
77−.PP
78−Example:
79−.PP
80−\f[CR]
81− sub\ status\ {
82− \ \ \ \ print\ \"working\";
83− }
84−\f[]
85−.RE
86−.RS
87−.IP "1." 3
88−do laundry
89−.IP "2." 3
90−take out the trash
91−.RE
92−.PP
93−Here's a nested one:
94−.RS
95−.PP
96−Joe said:
97−.RS
98−.PP
99−Don't quote me\.
100−.RE
101−.RE
102−.PP
10375And a following paragraph\.
10476.PP
10577 * * * * *
tests/writer.markdown−17
@@ -74,23 +74,6 @@ E-mail style:
7474
7575This should not be a block quote: 2 > 1.
7676
77−Box-style:
78−
79−> Example:
80−>
81−> sub status {
82−> print "working";
83−> }
84−
85−> 1. do laundry
86−> 2. take out the trash
87−
88−Here's a nested one:
89−
90−> Joe said:
91−>
92−> > Don't quote me.
93−
9477And a following paragraph.
9578
9679
tests/writer.native−14
@@ -39,20 +39,6 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
3939 [ Para [Str "nested"] ]
4040 ]
4141, 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 "."]
42−, Para [Str "Box",Str "-",Str "style:"]
43−, BlockQuote
44− [ Para [Str "Example:"]
45− , CodeBlock "sub status {\n print \"working\";\n}" ]
46−, BlockQuote
47− [ OrderedList (1,Decimal,Period)
48− [ [ Plain [Str "do",Space,Str "laundry"] ]
49− , [ Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ]
50−, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
51−, BlockQuote
52− [ Para [Str "Joe",Space,Str "said:"]
53− , BlockQuote
54− [ Para [Str "Don",Apostrophe,Str "t",Space,Str "quote",Space,Str "me",Str "."] ]
55− ]
5642, Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph",Str "."]
5743, HorizontalRule
5844, Header 1 [Str "Code",Space,Str "Blocks"]
tests/writer.rst−24
@@ -93,30 +93,6 @@ E-mail style:
9393
9494This should not be a block quote: 2 > 1.
9595
96−Box-style:
97−
98− Example:
99−
100− ::
101−
102− sub status {
103− print "working";
104− }
105−
106−
107−
108− 1. do laundry
109− 2. take out the trash
110−
111−
112−Here's a nested one:
113−
114− Joe said:
115−
116− Don't quote me.
117−
118−
119−
12096And a following paragraph.
12197
12298--------------
tests/writer.rtf−10
@@ -43,16 +43,6 @@ embedded link
4343{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par}
4444{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par}
4545{\pard \ql \f0 \sa180 \li0 \fi0 This should not be a block quote: 2 > 1.\par}
46−{\pard \ql \f0 \sa180 \li0 \fi0 Box-style:\par}
47−{\pard \ql \f0 \sa180 \li720 \fi0 Example:\par}
48−{\pard \ql \f0 \sa180 \li720 \fi0 \f1 sub status \{\line
49− print "working";\line
50−\}\par}
51−{\pard \ql \f0 \sa0 \li1080 \fi-360 1.\tx360\tab do laundry\par}
52−{\pard \ql \f0 \sa0 \li1080 \fi-360 2.\tx360\tab take out the trash\sa180\par}
53−{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a nested one:\par}
54−{\pard \ql \f0 \sa180 \li720 \fi0 Joe said:\par}
55−{\pard \ql \f0 \sa180 \li1440 \fi0 Don\u8217't quote me.\par}
5646{\pard \ql \f0 \sa180 \li0 \fi0 And a following paragraph.\par}
5747{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
5848{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Code Blocks\par}