Pretty: Make CR + BLANKLINE = BLANKLINE.
This fixes an extra blank line we were getting at the end of markdown fragments (as well as rst, org, etc.) Closes #1705.
This commit is contained in:
parent
88812c41ce
commit
7f6bbfadf4
6 changed files with 8 additions and 9 deletions
|
@ -286,6 +286,9 @@ renderList (BlankLines num : xs) = do
|
|||
| otherwise -> replicateM_ (1 + num - newlines st) (outp (-1) "\n")
|
||||
renderList xs
|
||||
|
||||
renderList (CarriageReturn : BlankLines m : xs) =
|
||||
renderList (BlankLines m : xs)
|
||||
|
||||
renderList (CarriageReturn : xs) = do
|
||||
st <- get
|
||||
if newlines st > 0 || null xs
|
||||
|
|
|
@ -65,4 +65,3 @@ Multiline table without column headers:
|
|||
|First |row |12.0 |Example of a row that spans multiple lines.
|
||||
|Second |row |5.0 |Here's another one. Note the blank line between rows.
|
||||
|=======================================================================
|
||||
|
||||
|
|
|
@ -74,4 +74,3 @@ Multiline table without column headers:
|
|||
> the blank line between
|
||||
> rows.
|
||||
> ----------- ---------- ------------ --------------------------
|
||||
|
||||
|
|
|
@ -49,4 +49,3 @@ Multiline table without column headers:
|
|||
|
||||
| First | row | 12.0 | Example of a row that spans multiple lines. |
|
||||
| Second | row | 5.0 | Here's another one. Note the blank line between rows. |
|
||||
|
||||
|
|
|
@ -88,4 +88,3 @@ Multiline table without column headers:
|
|||
| | | | the blank line between |
|
||||
| | | | rows. |
|
||||
+-------------+------------+--------------+----------------------------+
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</outline>
|
||||
<outline text="Level 1">
|
||||
<outline text="Level 2 with <em>emphasis</em>">
|
||||
<outline text="Level 3" _note="with no blank line ">
|
||||
<outline text="Level 3" _note="with no blank line">
|
||||
</outline>
|
||||
</outline>
|
||||
<outline text="Level 2" _note="with no blank line ------------------------------------------------------------------------">
|
||||
|
@ -55,18 +55,18 @@
|
|||
<outline text="Special Characters" _note="Here is some unicode: - I hat: Î - o umlaut: ö - section: § - set membership: ∈ - copyright: © AT&T has an ampersand in their name. AT&T is another way to write it. This & that. 4 \< 5. 6 \> 5. Backslash: \\ Backtick: \` Asterisk: \* Underscore: \_ Left brace: { Right brace: } Left bracket: [ Right bracket: ] Left paren: ( Right paren: ) Greater-than: \> Hash: \# Period: . Bang: ! Plus: + Minus: - ------------------------------------------------------------------------">
|
||||
</outline>
|
||||
<outline text="Links">
|
||||
<outline text="Explicit" _note="Just a [URL](/url/). [URL and title](/url/ "title"). [URL and title](/url/ "title preceded by two spaces"). [URL and title](/url/ "title preceded by a tab"). [URL and title](/url/ "title with "quotes" in it") [URL and title](/url/ "title with single quotes") [with\_underscore](/url/with_underscore) [Email link](mailto:nobody@nowhere.net) [Empty](). ">
|
||||
<outline text="Explicit" _note="Just a [URL](/url/). [URL and title](/url/ "title"). [URL and title](/url/ "title preceded by two spaces"). [URL and title](/url/ "title preceded by a tab"). [URL and title](/url/ "title with "quotes" in it") [URL and title](/url/ "title with single quotes") [with\_underscore](/url/with_underscore) [Email link](mailto:nobody@nowhere.net) [Empty]().">
|
||||
</outline>
|
||||
<outline text="Reference" _note="Foo [bar](/url/). Foo [bar](/url/). Foo [bar](/url/). With [embedded [brackets]](/url/). [b](/url/) by itself should be a link. Indented [once](/url). Indented [twice](/url). Indented [thrice](/url). This should [not][] be a link. [not]: /url Foo [bar](/url/ "Title with "quotes" inside"). Foo [biz](/url/ "Title with "quote" inside"). ">
|
||||
<outline text="Reference" _note="Foo [bar](/url/). Foo [bar](/url/). Foo [bar](/url/). With [embedded [brackets]](/url/). [b](/url/) by itself should be a link. Indented [once](/url). Indented [twice](/url). Indented [thrice](/url). This should [not][] be a link. [not]: /url Foo [bar](/url/ "Title with "quotes" inside"). Foo [biz](/url/ "Title with "quote" inside").">
|
||||
</outline>
|
||||
<outline text="With ampersands" _note="Here’s a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2). Here’s a link with an amersand in the link text: [AT&T](http://att.com/ "AT&T"). Here’s an [inline link](/script?foo=1&bar=2). Here’s an [inline link in pointy braces](/script?foo=1&bar=2). ">
|
||||
<outline text="With ampersands" _note="Here’s a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2). Here’s a link with an amersand in the link text: [AT&T](http://att.com/ "AT&T"). Here’s an [inline link](/script?foo=1&bar=2). Here’s an [inline link in pointy braces](/script?foo=1&bar=2).">
|
||||
</outline>
|
||||
<outline text="Autolinks" _note="With an ampersand: <http://example.com/?foo=1&bar=2> - In a list? - <http://example.com/> - It should. An e-mail address: <nobody@nowhere.net> > Blockquoted: <http://example.com/> Auto-links should not occur here: `<http://example.com/>` or here: <http://example.com/> ------------------------------------------------------------------------">
|
||||
</outline>
|
||||
</outline>
|
||||
<outline text="Images" _note="From “Voyage dans la Lune” by Georges Melies (1902): ![lalune](lalune.jpg "Voyage dans la Lune") Here is a movie ![movie](movie.jpg) icon. ------------------------------------------------------------------------">
|
||||
</outline>
|
||||
<outline text="Footnotes" _note="Here is a footnote reference,[^1] and another.[^2] This should *not* be a footnote reference, because it contains a space.[\^my note] Here is an inline note.[^3] > Notes can go in quotes.[^4] 1. And in list items.[^5] This paragraph should not be part of the note, as it is not indented. [^1]: Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. [^2]: Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { <code> } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. [^3]: This is *easier* to type. Inline notes may contain [links](http://google.com) and `]` verbatim characters, as well as [bracketed text]. [^4]: In quote. [^5]: In list. ">
|
||||
<outline text="Footnotes" _note="Here is a footnote reference,[^1] and another.[^2] This should *not* be a footnote reference, because it contains a space.[\^my note] Here is an inline note.[^3] > Notes can go in quotes.[^4] 1. And in list items.[^5] This paragraph should not be part of the note, as it is not indented. [^1]: Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. [^2]: Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). { <code> } If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. [^3]: This is *easier* to type. Inline notes may contain [links](http://google.com) and `]` verbatim characters, as well as [bracketed text]. [^4]: In quote. [^5]: In list.">
|
||||
</outline>
|
||||
</body>
|
||||
</opml>
|
||||
|
|
Loading…
Reference in a new issue