Skip to content

Commit

Permalink
fix: fix ref links inside table (#2471)
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed May 17, 2022
1 parent 107f42f commit 81daa2a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tokenizer.js
Expand Up @@ -405,7 +405,7 @@ export class Tokenizer {
l = item.header.length;
for (j = 0; j < l; j++) {
item.header[j].tokens = [];
this.lexer.inlineTokens(item.header[j].text, item.header[j].tokens);
this.lexer.inline(item.header[j].text, item.header[j].tokens);
}

// cell child tokens
Expand All @@ -414,7 +414,7 @@ export class Tokenizer {
row = item.rows[j];
for (k = 0; k < row.length; k++) {
row[k].tokens = [];
this.lexer.inlineTokens(row[k].text, row[k].tokens);
this.lexer.inline(row[k].text, row[k].tokens);
}
}

Expand Down
12 changes: 12 additions & 0 deletions test/specs/new/table_reference_link.html
@@ -0,0 +1,12 @@
<table>
<thead>
<tr>
<th>a</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://www.google.com">d</a></td>
</tr>
</tbody>
</table>
5 changes: 5 additions & 0 deletions test/specs/new/table_reference_link.md
@@ -0,0 +1,5 @@
| a |
| ------ |
| [d][c] |

[c]: https://www.google.com

1 comment on commit 81daa2a

@vercel
Copy link

@vercel vercel bot commented on 81daa2a May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.