fixup! block: parse tables
This commit is contained in:
		
					parent
					
						
							
								df8846cdba
							
						
					
				
			
			
				commit
				
					
						1135cf7054
					
				
			
		
					 3 changed files with 11 additions and 1 deletions
				
			
		
							
								
								
									
										10
									
								
								src/block.rs
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/block.rs
									
										
									
									
									
								
							| 
						 | 
					@ -1673,6 +1673,16 @@ mod test {
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #[test]
 | 
				
			||||||
 | 
					    fn parse_table_escaped() {
 | 
				
			||||||
 | 
					        test_parse!(
 | 
				
			||||||
 | 
					            "|a\\|\n",
 | 
				
			||||||
 | 
					            (Enter(Leaf(Paragraph)), ""),
 | 
				
			||||||
 | 
					            (Inline, "|a\\|"),
 | 
				
			||||||
 | 
					            (Exit(Leaf(Paragraph)), ""),
 | 
				
			||||||
 | 
					        );
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #[test]
 | 
					    #[test]
 | 
				
			||||||
    fn parse_table_post() {
 | 
					    fn parse_table_post() {
 | 
				
			||||||
        test_parse!(
 | 
					        test_parse!(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,7 +31,6 @@ pub enum Container {
 | 
				
			||||||
    Emphasis,
 | 
					    Emphasis,
 | 
				
			||||||
    Strong,
 | 
					    Strong,
 | 
				
			||||||
    Mark,
 | 
					    Mark,
 | 
				
			||||||
    // Verbatim
 | 
					 | 
				
			||||||
    Verbatim,
 | 
					    Verbatim,
 | 
				
			||||||
    /// Span is the format.
 | 
					    /// Span is the format.
 | 
				
			||||||
    RawFormat,
 | 
					    RawFormat,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -331,6 +331,7 @@ pub struct Parser<'s> {
 | 
				
			||||||
    /// Inline parser, recreated for each new inline.
 | 
					    /// Inline parser, recreated for each new inline.
 | 
				
			||||||
    inline_parser: Option<inline::Parser<span::InlineCharsIter<'s>>>,
 | 
					    inline_parser: Option<inline::Parser<span::InlineCharsIter<'s>>>,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /// Current table row is a head row.
 | 
				
			||||||
    table_head_row: bool,
 | 
					    table_head_row: bool,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// Footnote references in the order they were encountered, without duplicates.
 | 
					    /// Footnote references in the order they were encountered, without duplicates.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue