Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ mod table;
mod autolink;
mod inlines;


use arena_tree::Node;
use ctype::{isspace, isdigit};
use entity;
Expand Down
13 changes: 9 additions & 4 deletions src/parser/table.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use nodes::{NodeValue, TableAlignment, AstNode};
use arena_tree::Node;

use nodes::{NodeValue, TableAlignment, AstNode, make_block};
use parser::Parser;
use scanners;
use std::cell::RefCell;
use std::cmp::min;
use strings::trim;

Expand All @@ -21,7 +24,7 @@ pub fn try_opening_block<'a, 'o>(
}
}

pub fn try_opening_header<'a, 'o>(
fn try_opening_header<'a, 'o>(
parser: &mut Parser<'a, 'o>,
container: &'a AstNode<'a>,
line: &str,
Expand Down Expand Up @@ -57,7 +60,9 @@ pub fn try_opening_header<'a, 'o>(
}

let start_column = container.data.borrow().start_column;
let table = parser.add_child(container, NodeValue::Table(alignments), start_column);
let child = make_block(NodeValue::Table(alignments), parser.line_number, start_column);
let table = parser.arena.alloc(Node::new(RefCell::new(child)));
container.append(table);

let header = parser.add_child(table, NodeValue::TableRow(true), start_column);
for header_str in header_row {
Expand All @@ -72,7 +77,7 @@ pub fn try_opening_header<'a, 'o>(
}


pub fn try_opening_row<'a, 'o>(
fn try_opening_row<'a, 'o>(
parser: &mut Parser<'a, 'o>,
container: &'a AstNode<'a>,
alignments: &[TableAlignment],
Expand Down