block: add Element::list
This commit is contained in:
		
					parent
					
						
							
								f98ebd477f
							
						
					
				
			
			
				commit
				
					
						0d560901eb
					
				
			
		
					 2 changed files with 86 additions and 76 deletions
				
			
		
							
								
								
									
										160
									
								
								src/block.rs
									
										
									
									
									
								
							
							
						
						
									
										160
									
								
								src/block.rs
									
										
									
									
									
								
							|  | @ -88,7 +88,7 @@ pub enum Container { | ||||||
|     Div, |     Div, | ||||||
| 
 | 
 | ||||||
|     /// Span is the list marker of the first list item in the list.
 |     /// Span is the list marker of the first list item in the list.
 | ||||||
|     List { ty: ListType, tight: bool }, |     List(ListKind), | ||||||
| 
 | 
 | ||||||
|     /// Span is the list marker.
 |     /// Span is the list marker.
 | ||||||
|     ListItem(ListType), |     ListItem(ListType), | ||||||
|  | @ -106,6 +106,12 @@ pub enum Container { | ||||||
|     Section, |     Section, | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||||||
|  | pub struct ListKind { | ||||||
|  |     pub ty: ListType, | ||||||
|  |     pub tight: bool, | ||||||
|  | } | ||||||
|  | 
 | ||||||
| #[derive(Debug, Clone, Copy, PartialEq, Eq)] | #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||||||
| pub enum ListType { | pub enum ListType { | ||||||
|     Unordered(u8), |     Unordered(u8), | ||||||
|  | @ -227,15 +233,7 @@ impl<'s> TreeParser<'s> { | ||||||
|                         { |                         { | ||||||
|                             continue; |                             continue; | ||||||
|                         } |                         } | ||||||
|                         if let tree::Element::Container(Node::Container(Container::List { |                         self.tree.elem(*node).list_mut().unwrap().tight = false; | ||||||
|                             tight, |  | ||||||
|                             .. |  | ||||||
|                         })) = self.tree.elem(*node) |  | ||||||
|                         { |  | ||||||
|                             *tight = false; |  | ||||||
|                         } else { |  | ||||||
|                             panic!(); |  | ||||||
|                         } |  | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 self.prev_blankline = false; |                 self.prev_blankline = false; | ||||||
|  | @ -354,9 +352,10 @@ impl<'s> TreeParser<'s> { | ||||||
|                 }) |                 }) | ||||||
|             { |             { | ||||||
|                 let tight = true; |                 let tight = true; | ||||||
|                 let node = self |                 let node = self.tree.enter( | ||||||
|                     .tree |                     Node::Container(Container::List(ListKind { ty, tight })), | ||||||
|                     .enter(Node::Container(Container::List { ty, tight }), span); |                     span, | ||||||
|  |                 ); | ||||||
|                 self.open_lists.push(OpenList { |                 self.open_lists.push(OpenList { | ||||||
|                     ty, |                     ty, | ||||||
|                     depth: self.tree.depth().try_into().unwrap(), |                     depth: self.tree.depth().try_into().unwrap(), | ||||||
|  | @ -548,6 +547,16 @@ impl<'s> TreeParser<'s> { | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | impl<'t> tree::Element<'t, Node, Atom> { | ||||||
|  |     fn list_mut(&mut self) -> Option<&mut ListKind> { | ||||||
|  |         if let tree::Element::Container(Node::Container(Container::List(l))) = self { | ||||||
|  |             Some(l) | ||||||
|  |         } else { | ||||||
|  |             None | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /// Parser for a single block.
 | /// Parser for a single block.
 | ||||||
| struct MeteredBlock { | struct MeteredBlock { | ||||||
|     kind: Kind, |     kind: Kind, | ||||||
|  | @ -985,6 +994,7 @@ mod test { | ||||||
|     use super::FenceKind; |     use super::FenceKind; | ||||||
|     use super::Kind; |     use super::Kind; | ||||||
|     use super::Leaf::*; |     use super::Leaf::*; | ||||||
|  |     use super::ListKind; | ||||||
|     use super::ListType::*; |     use super::ListType::*; | ||||||
|     use super::Node::*; |     use super::Node::*; | ||||||
| 
 | 
 | ||||||
|  | @ -1378,10 +1388,10 @@ mod test { | ||||||
|         test_parse!( |         test_parse!( | ||||||
|             "- abc", |             "- abc", | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1390,10 +1400,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  | @ -1407,10 +1417,10 @@ mod test { | ||||||
|                 "- b\n", //
 |                 "- b\n", //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1424,10 +1434,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  | @ -1443,10 +1453,10 @@ mod test { | ||||||
|                 "- c\n", //
 |                 "- c\n", //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: false, |                     tight: false, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1466,10 +1476,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: false, |                     tight: false, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  | @ -1487,10 +1497,10 @@ mod test { | ||||||
|                 "- b\n",    //
 |                 "- b\n",    //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1499,10 +1509,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Atom(Blankline), "\n"), |             (Atom(Blankline), "\n"), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'+'), |                     ty: Unordered(b'+'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "+", |                 "+", | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'+')))), "+"), |             (Enter(Container(ListItem(Unordered(b'+')))), "+"), | ||||||
|  | @ -1517,10 +1527,10 @@ mod test { | ||||||
|             (Atom(Blankline), "\n"), |             (Atom(Blankline), "\n"), | ||||||
|             (Exit(Container(ListItem(Unordered(b'+')))), "+"), |             (Exit(Container(ListItem(Unordered(b'+')))), "+"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'+'), |                     ty: Unordered(b'+'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "+", |                 "+", | ||||||
|             ), |             ), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1530,10 +1540,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  | @ -1550,10 +1560,10 @@ mod test { | ||||||
|                 "    * c\n", //
 |                 "    * c\n", //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1562,10 +1572,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Atom(Blankline), "\n"), |             (Atom(Blankline), "\n"), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'+'), |                     ty: Unordered(b'+'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "+", |                 "+", | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'+')))), "+"), |             (Enter(Container(ListItem(Unordered(b'+')))), "+"), | ||||||
|  | @ -1574,10 +1584,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Atom(Blankline), "\n"), |             (Atom(Blankline), "\n"), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'*'), |                     ty: Unordered(b'*'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "*", |                 "*", | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'*')))), "*"), |             (Enter(Container(ListItem(Unordered(b'*')))), "*"), | ||||||
|  | @ -1586,26 +1596,26 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'*')))), "*"), |             (Exit(Container(ListItem(Unordered(b'*')))), "*"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'*'), |                     ty: Unordered(b'*'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "*", |                 "*", | ||||||
|             ), |             ), | ||||||
|             (Exit(Container(ListItem(Unordered(b'+')))), "+"), |             (Exit(Container(ListItem(Unordered(b'+')))), "+"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'+'), |                     ty: Unordered(b'+'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "+", |                 "+", | ||||||
|             ), |             ), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  | @ -1622,10 +1632,10 @@ mod test { | ||||||
|                 "cd\n",    //
 |                 "cd\n",    //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(45), |                     ty: Unordered(45), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(45)))), "-"), |             (Enter(Container(ListItem(Unordered(45)))), "-"), | ||||||
|  | @ -1634,10 +1644,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Atom(Blankline), "\n"), |             (Atom(Blankline), "\n"), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(42), |                     ty: Unordered(42), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "*" |                 "*" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(42)))), "*"), |             (Enter(Container(ListItem(Unordered(42)))), "*"), | ||||||
|  | @ -1647,18 +1657,18 @@ mod test { | ||||||
|             (Atom(Blankline), "\n"), |             (Atom(Blankline), "\n"), | ||||||
|             (Exit(Container(ListItem(Unordered(42)))), "*"), |             (Exit(Container(ListItem(Unordered(42)))), "*"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(42), |                     ty: Unordered(42), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "*" |                 "*" | ||||||
|             ), |             ), | ||||||
|             (Exit(Container(ListItem(Unordered(45)))), "-"), |             (Exit(Container(ListItem(Unordered(45)))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(45), |                     ty: Unordered(45), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Leaf(Paragraph)), ""), |             (Enter(Leaf(Paragraph)), ""), | ||||||
|  | @ -1676,10 +1686,10 @@ mod test { | ||||||
|                 "+ c\n", //
 |                 "+ c\n", //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1688,17 +1698,17 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'+'), |                     ty: Unordered(b'+'), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "+" |                 "+" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'+')))), "+"), |             (Enter(Container(ListItem(Unordered(b'+')))), "+"), | ||||||
|  | @ -1712,10 +1722,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'+')))), "+"), |             (Exit(Container(ListItem(Unordered(b'+')))), "+"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'+'), |                     ty: Unordered(b'+'), | ||||||
|                     tight: true |                     tight: true | ||||||
|                 })), |                 }))), | ||||||
|                 "+" |                 "+" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  | @ -1730,10 +1740,10 @@ mod test { | ||||||
|                 "   description\n", //
 |                 "   description\n", //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Description, |                     ty: Description, | ||||||
|                     tight: false |                     tight: false, | ||||||
|                 })), |                 }))), | ||||||
|                 ":" |                 ":" | ||||||
|             ), |             ), | ||||||
|             (Enter(Leaf(DescriptionTerm)), ""), |             (Enter(Leaf(DescriptionTerm)), ""), | ||||||
|  | @ -1746,10 +1756,10 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Description))), ":"), |             (Exit(Container(ListItem(Description))), ":"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Description, |                     ty: Description, | ||||||
|                     tight: false |                     tight: false, | ||||||
|                 })), |                 }))), | ||||||
|                 ":" |                 ":" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  | @ -1944,18 +1954,18 @@ mod test { | ||||||
|                 "  - b\n", //
 |                 "  - b\n", //
 | ||||||
|             ), |             ), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Enter(Container(List { |                 Enter(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Enter(Container(ListItem(Unordered(b'-')))), "-"), |             (Enter(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|  | @ -1969,18 +1979,18 @@ mod test { | ||||||
|             (Exit(Leaf(Paragraph)), ""), |             (Exit(Leaf(Paragraph)), ""), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|             (Exit(Container(ListItem(Unordered(b'-')))), "-"), |             (Exit(Container(ListItem(Unordered(b'-')))), "-"), | ||||||
|             ( |             ( | ||||||
|                 Exit(Container(List { |                 Exit(Container(List(ListKind { | ||||||
|                     ty: Unordered(b'-'), |                     ty: Unordered(b'-'), | ||||||
|                     tight: true, |                     tight: true, | ||||||
|                 })), |                 }))), | ||||||
|                 "-" |                 "-" | ||||||
|             ), |             ), | ||||||
|         ); |         ); | ||||||
|  |  | ||||||
|  | @ -827,7 +827,7 @@ impl<'s> Parser<'s> { | ||||||
|                                 self.block_attributes = Attributes::new(); |                                 self.block_attributes = Attributes::new(); | ||||||
|                                 continue; |                                 continue; | ||||||
|                             } |                             } | ||||||
|                             block::Container::List { ty, tight } => { |                             block::Container::List(block::ListKind { ty, tight }) => { | ||||||
|                                 if matches!(ty, block::ListType::Description) { |                                 if matches!(ty, block::ListType::Description) { | ||||||
|                                     Container::DescriptionList |                                     Container::DescriptionList | ||||||
|                                 } else { |                                 } else { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue