Skip to content

Commit

Permalink
Table should be able to interrupt other blocks (dart-lang#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguang authored May 22, 2023
1 parent 0bc9d0e commit bd6ae8d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/block_syntaxes/table_syntax.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'block_syntax.dart';
/// Parses tables.
class TableSyntax extends BlockSyntax {
@override
bool canEndBlock(BlockParser parser) => false;
bool canEndBlock(BlockParser parser) => true;

@override
RegExp get pattern => dummyPattern;
Expand Down
21 changes: 21 additions & 0 deletions test/extensions/tables.unit
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,24 @@ too | many | cells | here
</tr>
</tbody>
</table>
>>> can interrupt a paragraph
paragraph
foo | bar
--- | ---
baz | bim
<<<
<p>paragraph</p>
<table>
<thead>
<tr>
<th>foo</th>
<th>bar</th>
</tr>
</thead>
<tbody>
<tr>
<td>baz</td>
<td>bim</td>
</tr>
</tbody>
</table>

0 comments on commit bd6ae8d

Please sign in to comment.