Fix test break introduced by test-only dependency markdown-it-texmath changing the tag for token type "math_block" from "math" to "$$" from version 0.9.6 to 0.9.7.

This commit is contained in:
David Anson 2021-12-17 01:56:42 +00:00 committed by GitHub
parent b8e8609f5f
commit 8849e84e1c
2 changed files with 2 additions and 2 deletions

View file

@ -251,7 +251,7 @@ module.exports.filterTokens = filterTokens;
* @returns {boolean} True iff token is a math block.
*/
function isMathBlock(token) {
return ((token.tag === "math") &&
return (((token.tag === "$$") || (token.tag === "math")) &&
token.type.startsWith("math_block") &&
!token.type.endsWith("_end"));
}

View file

@ -247,7 +247,7 @@ module.exports.filterTokens = filterTokens;
*/
function isMathBlock(token) {
return (
(token.tag === "math") &&
((token.tag === "$$") || (token.tag === "math")) &&
token.type.startsWith("math_block") &&
!token.type.endsWith("_end")
);