Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix many nested-lists cases, by tracking the indent correctly as thin…
…gs get indented.
- Loading branch information
Showing
6 changed files
with
149 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Lists with multiple paragraphs | ||
*** Parameters: *** | ||
{} | ||
*** Markdown input: *** | ||
* A list item with a couple paragraphs, | ||
each of which is indented. | ||
|
||
For example, this paragraph. | ||
|
||
* Another list item | ||
*** Output of inspect *** | ||
md_el(:document, md_el(:ul, [ | ||
md_li([ | ||
md_par("A list item with a couple paragraphs, each of which is indented."), | ||
md_par("For example, this paragraph.") | ||
], true), | ||
md_li(md_par("Another list item"), false) | ||
])) | ||
*** Output of to_html *** | ||
<ul> | ||
<li> | ||
<p>A list item with a couple paragraphs, each of which is indented.</p> | ||
|
||
<p>For example, this paragraph.</p> | ||
</li> | ||
|
||
<li> | ||
<p>Another list item</p> | ||
</li> | ||
</ul> | ||
*** Output of to_latex *** | ||
\begin{itemize}% | ||
\item A list item with a couple paragraphs, each of which is indented. | ||
|
||
For example, this paragraph. | ||
|
||
|
||
\item Another list item | ||
|
||
|
||
|
||
\end{itemize} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Lists should allow newlines between items. | ||
*** Parameters: *** | ||
{} | ||
*** Markdown input: *** | ||
* A list item | ||
|
||
|
||
|
||
* Another list item | ||
*** Output of inspect *** | ||
md_el(:document,[ | ||
md_el(:ul,[ | ||
md_li(md_par("A list item"), true), | ||
md_li(md_par("Another list item"), false) | ||
]) | ||
]) | ||
*** Output of to_html *** | ||
<ul> | ||
<li> | ||
<p>A list item</p> | ||
</li> | ||
<li> | ||
<p>Another list item</p> | ||
</li> | ||
</ul> | ||
*** Output of to_latex *** | ||
\begin{itemize}% | ||
\item A list item | ||
|
||
|
||
\item Another list item | ||
|
||
|
||
|
||
\end{itemize} |
2 changes: 1 addition & 1 deletion
2
spec/block_docs/list3.md → spec/block_docs/lists_blockquote_code.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
PENDING - Nesting lists. (Pending because Maruku still improperly wraps items in paragraphs) | ||
*** Parameters: *** | ||
{} # params | ||
*** Markdown input: *** | ||
* A list item | ||
* Foo | ||
* Bar | ||
* Bax | ||
* Bap | ||
* Another list item | ||
*** Output of inspect *** | ||
md_el(:document, md_el(:ul, [ | ||
md_li([ | ||
"A list item", | ||
md_el(:ul, [ | ||
md_li("Foo", false), | ||
md_li([ | ||
"Bar", | ||
md_el(:ul, [ | ||
md_el(:li_span, "Bax", {:want_my_paragraph=>false}), | ||
md_el(:li_span, "Bap", {:want_my_paragraph=>false}) | ||
]) | ||
], true) | ||
]) | ||
], true), | ||
md_li(md_par("Another list item"), false) | ||
])) | ||
*** Output of to_html *** | ||
<ul> | ||
<li>A list item | ||
|
||
<ul> | ||
<li>Foo</li> | ||
|
||
<li>Bar | ||
|
||
<ul> | ||
<li>Bax</li> | ||
|
||
<li>Bap</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</li> | ||
|
||
<li>Another list item</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters