diff --git a/corpus/custom.txt b/corpus/custom.txt index 7bb152d..0d36462 100644 --- a/corpus/custom.txt +++ b/corpus/custom.txt @@ -45,8 +45,13 @@ Table (extension) - same indentation in list item [is table] (tight_list (list_item (list_marker) - (paragraph - (soft_line_break))))) + (table + (table_header_row + (table_cell) + (table_cell)) + (table_delimiter_row + (table_column_alignment) + (table_column_alignment)))))) ================================================================================ Table (extension) - less indentation in list item [is NOT table] diff --git a/src/tree_sitter_markdown/block_scan.cc b/src/tree_sitter_markdown/block_scan.cc index 5d6ef15..9bbaeab 100644 --- a/src/tree_sitter_markdown/block_scan.cc +++ b/src/tree_sitter_markdown/block_scan.cc @@ -70,7 +70,7 @@ void scn_blk(Lexer &lxr, BlockDelimiterList &blk_dlms, const BlockContextStack & bool is_pas_all_blk_ctx = ctx_itr == ctx_end && (blk_ctx_stk.empty() || !is_lst_itm_bgn(blk_ctx_stk.back().sym()) ? cur_ind < 4 - : cur_ind > ind && cur_ind - ind < 4); + : cur_ind >= ind && cur_ind - ind < 4); if (is_pas_all_blk_ctx && !is_eol_chr(lxr.lka_chr()) && scn_tbl_dlm_row(lxr, tbl_col_cnt)) { is_tbl = true; tmp_blk_dlms.push_back(BlockDelimiter(SYM_TBL_HED_ROW_BGN_MKR, bgn_pos, bgn_pos));