git.iko.soy/typeable/pandoc
on master help sign in
Changed footnote syntax to conform to the de facto standard

for markdown footnotes. References are now like this[^1] rather than like this^(1). There are corresponding changes in the footnotes themselves. See the updated README for more details. git-svn-id: https://pandoc.googlecode.com/svn/trunk@230 788f1e2b-df1e-0410-8736-df70ead52e1b

commit3a6296acae34ddb2ea7678ee6d8c727aab4eb087 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateTue 19 Dec 2006, 07:30 (20 years ago) parenta8bbd95
12 files changed+92−80
README+15−13 src/Text/Pandoc/Readers/Markdown.hs+25−11 src/Text/Pandoc/Writers/Markdown.hs+3−3 tests/testsuite.native+3−3 tests/testsuite.txt+12−14 tests/writer.html+3−3 tests/writer.latex+2−2 tests/writer.markdown+15−16 tests/writer.native+3−3 tests/writer.rst+5−6 tests/writer.rtf+3−3 tests/writer.smart.html+3−3
README+15−13
@@ -341,23 +341,25 @@ appear as `[link]` if there's no reference for `link`. If you want
341341
342342Pandoc's markdown allows footnotes, using the following syntax:
343343
344− here is a footnote reference,^(1) and another.^(longnote)
344+ Here is a footnote reference,[^1] and another.[^longnote]
345345
346− ^(1) Here is the footnote. It can go anywhere in the document,
346+ [^1]: Here is the footnote. It can go anywhere in the document,
347347 except in embedded contexts like block quotes or lists.
348348
349− ^(longnote) Here's the other note. This one contains multiple
349+ [^longnote]: Here's the other note. This one contains multiple
350350 blocks.
351− ^
352− ^ Caret characters are used to indicate that the blocks all belong
353− to a single footnote (as with block quotes).
354− ^
355− ^ If you want, you can use a caret at the beginning of every line,
356− ^ as with blockquotes, but all that you need is a caret at the
357− ^ beginning of the first line of the block and any preceding
358− ^ blank lines.
359−
360−Footnote references may not contain spaces, tabs, or newlines.
351+
352+ Subsequent blocks are indented to show that they belong to
353+ the previous footnote.
354+
355+ { some.code }
356+
357+ The whole block can be indented, or just the first line.
358+ In this way, multi-block footnotes work just like multi-block
359+ list items in markdown.
360+
361+The identifiers in footnote references may not contain spaces, tabs,
362+or newlines.
361363
362364## Embedded HTML
363365
src/Text/Pandoc/Readers/Markdown.hs+25−11
@@ -124,7 +124,7 @@ parseBlocks = do
124124 result <- manyTill block eof
125125 return result
126126
127−block = choice [ codeBlock, referenceKey, note, header, hrule, list, blockQuote, rawHtmlBlocks,
127+block = choice [ codeBlock, note, referenceKey, header, hrule, list, blockQuote, rawHtmlBlocks,
128128 rawLaTeXEnvironment, para, plain, blankBlock, nullBlock ] <?> "block"
129129
130130--
@@ -200,19 +200,31 @@ codeBlock = do
200200-- note block
201201--
202202
203+rawLine = try (do
204+ notFollowedBy' blankline
205+ contents <- many1 nonEndline
206+ end <- option "" (do
207+ newline
208+ option "" indentSpaces
209+ return "\n")
210+ return (contents ++ end))
211+
212+rawLines = do
213+ lines <- many1 rawLine
214+ return (concat lines)
215+
203216note = try (do
204217 (NoteRef ref) <- noteRef
218+ char ':'
205219 skipSpaces
206− raw <- sepBy (many (choice [nonEndline,
207− (try (do {endline; notFollowedBy (char noteStart); return '\n'}))
208− ])) (try (do {newline; char noteStart; option ' ' (char ' ')}))
209− newline
210− blanklines
211− -- parse the extracted block, which may contain various block elements:
220+ skipEndline
221+ raw <- sepBy rawLines (try (do {blankline; indentSpaces}))
222+ option "" blanklines
223+ -- parse the extracted text, which may contain various block elements:
212224 state <- getState
213225 let parsed = case runParser parseBlocks (state {stateParserContext = BlockQuoteState}) "block" ((joinWithSep "\n" raw) ++ "\n\n") of
214226 Left err -> error $ "Raw block:\n" ++ show raw ++ "\nError:\n" ++ show err
215− Right result -> result
227+ Right result -> result
216228 return (Note ref parsed))
217229
218230--
@@ -398,8 +410,8 @@ text = choice [ math, strong, emph, code2, code1, str, linebreak, tabchar,
398410
399411inline = choice [ rawLaTeXInline, escapedChar, special, hyphens, text, ltSign, symbol ] <?> "inline"
400412
401−special = choice [ link, referenceLink, rawHtmlInline, autoLink,
402− image, noteRef ] <?> "link, inline html, note, or image"
413+special = choice [ noteRef, link, referenceLink, rawHtmlInline, autoLink,
414+ image ] <?> "link, inline html, note, or image"
403415
404416escapedChar = escaped anyChar
405417
@@ -505,6 +517,7 @@ endline =
505517-- a reference label for a link
506518reference = do
507519 char labelStart
520+ notFollowedBy (char noteStart)
508521 label <- manyTill inline (char labelEnd)
509522 return (normalizeSpaces label)
510523
@@ -575,7 +588,8 @@ image =
575588 return (Image label src))
576589
577590noteRef = try (do
591+ char labelStart
578592 char noteStart
579− ref <- between (char '(') (char ')') (many1 (noneOf " \t\n)"))
593+ ref <- manyTill (noneOf " \t\n") (char labelEnd)
580594 return (NoteRef ref))
581595
src/Text/Pandoc/Writers/Markdown.hs+3−3
@@ -76,8 +76,8 @@ blockToMarkdown tabStop (Note ref lst) =
7676 else
7777 let first = head lns
7878 rest = tail lns in
79− text ("^(" ++ (escapeString ref) ++ ") ") <> (text first) $$ (vcat $
80− map (\line -> (text "^ ") <> (text line)) rest) <> (text "\n")
79+ text ("[^" ++ (escapeString ref) ++ "]: ") <> (text first) $$ (vcat $
80+ map (\line -> (text " ") <> (text line)) rest) <> (text "\n")
8181blockToMarkdown tabStop (Key txt (Src src tit)) =
8282 text " " <> char '[' <> inlineListToMarkdown txt <> char ']' <> text ": " <> text src <>
8383 (if tit /= "" then (text (" \"" ++ (escapeLinkTitle tit) ++ "\"")) else empty)
@@ -145,4 +145,4 @@ inlineToMarkdown (Image alternate (Ref [])) =
145145inlineToMarkdown (Image alternate (Ref ref)) =
146146 char '!' <> char '[' <> inlineListToMarkdown alternate <> char ']' <>
147147 char '[' <> inlineListToMarkdown ref <> char ']'
148−inlineToMarkdown (NoteRef ref) = char '^' <> char '(' <> text (escapeString ref) <> char ')'
148+inlineToMarkdown (NoteRef ref) = text "[^" <> text (escapeString ref) <> char ']'
tests/testsuite.native+3−3
@@ -318,12 +318,12 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
318318, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] (Src "movie.jpg" ""),Space,Str "icon."]
319319, HorizontalRule
320320, Header 1 [Str "Footnotes"]
321−, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",NoteRef "1",Str ",",Space,Str "and",Space,Str "another",NoteRef "longnote",Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str "^",Str "(my",Space,Str "note)."]
321+, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",NoteRef "1",Str ",",Space,Str "and",Space,Str "another",NoteRef "longnote",Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Str "."]
322322, Note "1"
323323 [ Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."] ]
324324
325325, Note "longnote"
326326 [ Para [Str "Here's",Space,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."]
327− , Para [Str "Caret",Space,Str "characters",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "indicate",Space,Str "that",Space,Str "the",Space,Str "blocks",Space,Str "all",Space,Str "belong",Space,Str "to",Space,Str "a",Space,Str "single",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "block",Space,Str "quotes)."]
327+ , Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."]
328328 , CodeBlock " { <code> }"
329− , Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",Space,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."] ] ]
329+ , Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."] ] ]
tests/testsuite.txt+12−14
@@ -590,22 +590,20 @@ Here is a movie ![movie](movie.jpg) icon.
590590
591591# Footnotes
592592
593−Here is a footnote reference^(1), and another^(longnote).
593+Here is a footnote reference[^1], and another[^longnote].
594594This should *not* be a footnote reference, because it
595−contains a space^(my note).
595+contains a space[^my note].
596596
597−^(1) Here is the footnote. It can go anywhere in the document,
597+[^1]: Here is the footnote. It can go anywhere in the document,
598598not just at the end.
599599
600−^(longnote) Here's the other note. This one contains multiple
600+[^longnote]: Here's the other note. This one contains multiple
601601blocks.
602−^
603−^ Caret characters are used to indicate that the blocks all belong
604−to a single footnote (as with block quotes).
605−^
606−^ { <code> }
607−^
608−^ If you want, you can use a caret at the beginning of every line,
609−^ as with blockquotes, but all that you need is a caret at the
610−^ beginning of the first line of the block and any preceding
611−^ blank lines.
602+
603+ Subsequent blocks are indented to show that they belong to the
604+footnote (as with list items).
605+
606+ { <code> }
607+
608+ If you want, you can indent every line, but you can also be
609+ lazy and just indent the first line of each block.
tests/writer.html+3−3
@@ -438,17 +438,17 @@ Cat &amp; 1 \\ \hline
438438<p>Here is a movie <img src="movie.jpg" alt="movie"> icon.</p>
439439<hr />
440440<h1>Footnotes</h1>
441−<p>Here is a footnote reference<span class="pandocNoteRef"><a name="ref_1" href="#note_1">(1)</a></span>, and another<span class="pandocNoteRef"><a name="ref_longnote" href="#note_longnote">(longnote)</a></span>. This should <em>not</em> be a footnote reference, because it contains a space^(my note).</p>
441+<p>Here is a footnote reference<span class="pandocNoteRef"><a name="ref_1" href="#note_1">(1)</a></span>, and another<span class="pandocNoteRef"><a name="ref_longnote" href="#note_longnote">(longnote)</a></span>. This should <em>not</em> be a footnote reference, because it contains a space[^my note].</p>
442442<div class="pandocNote">
443443<p class="first"><span class="pandocNoteMarker"><a name="note_1" href="#ref_1">(1)</a></span> Here is the footnote. It can go anywhere in the document, not just at the end.</p>
444444
445445</div>
446446<div class="pandocNote">
447447<p class="first"><span class="pandocNoteMarker"><a name="note_longnote" href="#ref_longnote">(longnote)</a></span> Here's the other note. This one contains multiple blocks.</p>
448−<p>Caret characters are used to indicate that the blocks all belong to a single footnote (as with block quotes).</p>
448+<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
449449<pre><code> { &lt;code> }
450450</code></pre>
451−<p>If you want, you can use a caret at the beginning of every line, as with blockquotes, but all that you need is a caret at the beginning of the first line of the block and any preceding blank lines.</p>
451+<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.</p>
452452
453453</div>
454454</body>
tests/writer.latex+2−2
@@ -569,12 +569,12 @@ Here is a movie \includegraphics{movie.jpg} icon.
569569
570570Here is a footnote reference\footnote{Here is the footnote. It can go anywhere in the document, not just at the end.}, and another\footnote{Here's the other note. This one contains multiple blocks.
571571
572−Caret characters are used to indicate that the blocks all belong to a single footnote (as with block quotes).
572+Subsequent blocks are indented to show that they belong to the footnote (as with list items).
573573
574574\begin{verbatim}
575575 { <code> }
576576\end{verbatim}
577−If you want, you can use a caret at the beginning of every line, as with blockquotes, but all that you need is a caret at the beginning of the first line of the block and any preceding blank lines.}. This should \emph{not} be a footnote reference, because it contains a space\^{}(my note).
577+If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.}. This should \emph{not} be a footnote reference, because it contains a space[\^{}my note].
578578
579579
580580\end{document}
tests/writer.markdown+15−16
@@ -607,21 +607,20 @@ Here is a movie ![movie](movie.jpg) icon.
607607
608608# Footnotes
609609
610−Here is a footnote reference^(1), and another^(longnote). This
610+Here is a footnote reference[^1], and another[^longnote]. This
611611should *not* be a footnote reference, because it contains a
612−space\^(my note).
613−
614−^(1) Here is the footnote. It can go anywhere in the document, not just
615−^ at the end.
616−
617−^(longnote) Here's the other note. This one contains multiple blocks.
618−^
619−^ Caret characters are used to indicate that the blocks all belong to
620−^ a single footnote (as with block quotes).
621−^
622−^ { <code> }
623−^
624−^ If you want, you can use a caret at the beginning of every line, as
625−^ with blockquotes, but all that you need is a caret at the beginning
626−^ of the first line of the block and any preceding blank lines.
612+space[\^my note].
613+
614+[^1]: Here is the footnote. It can go anywhere in the document, not just
615+ at the end.
616+
617+[^longnote]: Here's the other note. This one contains multiple blocks.
618+
619+ Subsequent blocks are indented to show that they belong to the
620+ footnote (as with list items).
621+
622+ { <code> }
623+
624+ If you want, you can indent every line, but you can also be lazy
625+ and just indent the first line of each block.
627626
tests/writer.native+3−3
@@ -318,12 +318,12 @@ Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane
318318, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "movie"] (Src "movie.jpg" ""),Space,Str "icon."]
319319, HorizontalRule
320320, Header 1 [Str "Footnotes"]
321−, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",NoteRef "1",Str ",",Space,Str "and",Space,Str "another",NoteRef "longnote",Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str "^",Str "(my",Space,Str "note)."]
321+, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",NoteRef "1",Str ",",Space,Str "and",Space,Str "another",NoteRef "longnote",Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space",Str "[",Str "^",Str "my",Space,Str "note",Str "]",Str "."]
322322, Note "1"
323323 [ Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."] ]
324324
325325, Note "longnote"
326326 [ Para [Str "Here's",Space,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."]
327− , Para [Str "Caret",Space,Str "characters",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "indicate",Space,Str "that",Space,Str "the",Space,Str "blocks",Space,Str "all",Space,Str "belong",Space,Str "to",Space,Str "a",Space,Str "single",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "block",Space,Str "quotes)."]
327+ , Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."]
328328 , CodeBlock " { <code> }"
329− , Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",Space,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."] ] ]
329+ , Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."] ] ]
tests/writer.rst+5−6
@@ -697,7 +697,7 @@ Footnotes
697697
698698Here is a footnote reference [1]_, and another [longnote]_. This
699699should *not* be a footnote reference, because it contains a
700−space^(my note).
700+space[^my note].
701701
702702.. [1]
703703 Here is the footnote. It can go anywhere in the document, not just
@@ -706,16 +706,15 @@ space^(my note).
706706.. [longnote]
707707 Here's the other note. This one contains multiple blocks.
708708
709− Caret characters are used to indicate that the blocks all belong to
710− a single footnote (as with block quotes).
709+ Subsequent blocks are indented to show that they belong to the
710+ footnote (as with list items).
711711
712712 ::
713713
714714 { <code> }
715715
716− If you want, you can use a caret at the beginning of every line, as
717− with blockquotes, but all that you need is a caret at the beginning
718− of the first line of the block and any preceding blank lines.
716+ If you want, you can indent every line, but you can also be lazy
717+ and just indent the first line of each block.
719718
720719
721720.. _embedded link: /url
tests/writer.rtf+3−3
@@ -369,9 +369,9 @@ http://example.com/
369369{\pard \f0 \sa180 \li0 \fi0 \b \fs36 Footnotes\par}
370370{\pard \f0 \sa180 \li0 \fi0 Here is a footnote reference{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \f0 \sa180 \li0 \fi0 Here is the footnote. It can go anywhere in the document, not just at the end.\par}
371371}, and another{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \f0 \sa180 \li0 \fi0 Here's the other note. This one contains multiple blocks.\par}
372−{\pard \f0 \sa180 \li0 \fi0 Caret characters are used to indicate that the blocks all belong to a single footnote (as with block quotes).\par}
372+{\pard \f0 \sa180 \li0 \fi0 Subsequent blocks are indented to show that they belong to the footnote (as with list items).\par}
373373{\pard \f0 \sa180 \li0 \fi0 \f1 \{ <code> \}\par}
374−{\pard \f0 \sa180 \li0 \fi0 If you want, you can use a caret at the beginning of every line, as with blockquotes, but all that you need is a caret at the beginning of the first line of the block and any preceding blank lines.\par}
375−}. This should {\i not} be a footnote reference, because it contains a space^(my note).\par}
374+{\pard \f0 \sa180 \li0 \fi0 If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.\par}
375+}. This should {\i not} be a footnote reference, because it contains a space[^my note].\par}
376376
377377}
tests/writer.smart.html+3−3
@@ -438,17 +438,17 @@ Cat &amp; 1 \\ \hline
438438<p>Here is a movie <img src="movie.jpg" alt="movie"> icon.</p>
439439<hr />
440440<h1>Footnotes</h1>
441−<p>Here is a footnote reference<span class="pandocNoteRef"><a name="ref_1" href="#note_1">(1)</a></span>, and another<span class="pandocNoteRef"><a name="ref_longnote" href="#note_longnote">(longnote)</a></span>. This should <em>not</em> be a footnote reference, because it contains a space^(my note).</p>
441+<p>Here is a footnote reference<span class="pandocNoteRef"><a name="ref_1" href="#note_1">(1)</a></span>, and another<span class="pandocNoteRef"><a name="ref_longnote" href="#note_longnote">(longnote)</a></span>. This should <em>not</em> be a footnote reference, because it contains a space[^my note].</p>
442442<div class="pandocNote">
443443<p class="first"><span class="pandocNoteMarker"><a name="note_1" href="#ref_1">(1)</a></span> Here is the footnote. It can go anywhere in the document, not just at the end.</p>
444444
445445</div>
446446<div class="pandocNote">
447447<p class="first"><span class="pandocNoteMarker"><a name="note_longnote" href="#ref_longnote">(longnote)</a></span> Here&rsquo;s the other note. This one contains multiple blocks.</p>
448−<p>Caret characters are used to indicate that the blocks all belong to a single footnote (as with block quotes).</p>
448+<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
449449<pre><code> { &lt;code> }
450450</code></pre>
451−<p>If you want, you can use a caret at the beginning of every line, as with blockquotes, but all that you need is a caret at the beginning of the first line of the block and any preceding blank lines.</p>
451+<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.</p>
452452
453453</div>
454454</body>