Skip to content

Commit

Permalink
Treat TABLECELLBOUNDARIES chain as special one.
Browse files Browse the repository at this point in the history
It's not an ordinary openers chain as (most of) the others, and
md_rollback() must not touch it.

Fixes #212.
  • Loading branch information
mity committed Jan 10, 2024
1 parent 338e0bb commit c6942ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/md4c.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ struct MD_CTX_tag {
#define TILDE_OPENERS_2 (ctx->mark_chains[10])
#define BRACKET_OPENERS (ctx->mark_chains[11])
#define DOLLAR_OPENERS (ctx->mark_chains[12])
#define OPENERS_CHAIN_FIRST 1
#define OPENERS_CHAIN_FIRST 2 /* [0] and [1] are special. */
#define OPENERS_CHAIN_LAST 12

int n_table_cell_boundaries;
Expand Down
22 changes: 22 additions & 0 deletions test/tables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,25 @@ A | B
</thead>
</table>
````````````````````````````````


### [Issue 212](https://github.com/mity/md4c/issues/212)

```````````````````````````````` example
x
|-
|[*x*]()
.
<table>
<thead>
<tr>
<th>x</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href=""><em>x</em></a></td>
</tr>
</tbody>
</table>
````````````````````````````````

0 comments on commit c6942ef

Please sign in to comment.