File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -633,9 +633,13 @@ onlySimpleTableCells = all isSimpleCell . concat
633633
634634-- | Detect if a list is tight.
635635isTightList :: [[Block ]] -> Bool
636- isTightList = all (\ item -> firstIsPlain item || null item)
637- where firstIsPlain (Plain _ : _) = True
638- firstIsPlain _ = False
636+ isTightList = all isPlainItem
637+ where
638+ isPlainItem [] = True
639+ isPlainItem (Plain _ : _) = True
640+ isPlainItem [BulletList xs] = isTightList xs
641+ isPlainItem [OrderedList _ xs] = isTightList xs
642+ isPlainItem _ = False
639643
640644-- | Convert a list item containing tasklist syntax (e.g. @[x]@)
641645-- to using @U+2610 BALLOT BOX@ or @U+2612 BALLOT BOX WITH X@.
Original file line number Diff line number Diff line change @@ -12,12 +12,9 @@ Nested bullet lists
1212</ul>
1313^D
1414- L1
15-
1615- L2
17-
1816- - L3.1
1917 - L3.2
20-
2118- L4
2219```
2320
@@ -34,9 +31,7 @@ Nested ordered lists
3431</ol>
3532^D
36331. L1
37-
38342. L2
39-
40353. 1. L3.1
4136 2. L3.2
4237```
@@ -54,9 +49,7 @@ Ordered list nested below an unordered list
5449</ul>
5550^D
5651- L1
57-
5852- L2
59-
6053- 1. L3.1
6154 2. L3.2
6255```
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Definition
1010 2. list
1111^D
1212\begin{description}
13+ \tightlist
1314\item[Definition]
1415\begin{enumerate}
1516\def\labelenumi{\arabic{enumi}.}
@@ -53,6 +54,7 @@ Definition
5354 - list
5455^D
5556\begin{description}
57+ \tightlist
5658\item[Definition]
5759\begin{itemize}
5860\tightlist
You can’t perform that action at this time.
0 commit comments