From 81daa2ae47924f7da04289f7c43cbb2a1f58cfa7 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Tue, 17 May 2022 08:28:47 -0500 Subject: [PATCH] fix: fix ref links inside table (#2471) --- src/Tokenizer.js | 4 ++-- test/specs/new/table_reference_link.html | 12 ++++++++++++ test/specs/new/table_reference_link.md | 5 +++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 test/specs/new/table_reference_link.html create mode 100644 test/specs/new/table_reference_link.md diff --git a/src/Tokenizer.js b/src/Tokenizer.js index 755a62d285..e8a69b6759 100644 --- a/src/Tokenizer.js +++ b/src/Tokenizer.js @@ -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 @@ -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); } } diff --git a/test/specs/new/table_reference_link.html b/test/specs/new/table_reference_link.html new file mode 100644 index 0000000000..995b68bc85 --- /dev/null +++ b/test/specs/new/table_reference_link.html @@ -0,0 +1,12 @@ + + + + + + + + + + + +
a
d
diff --git a/test/specs/new/table_reference_link.md b/test/specs/new/table_reference_link.md new file mode 100644 index 0000000000..61e3af3402 --- /dev/null +++ b/test/specs/new/table_reference_link.md @@ -0,0 +1,5 @@ +| a | +| ------ | +| [d][c] | + +[c]: https://www.google.com