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 4ed6af67ac
commit ecf42ad7f5
2 changed files with 2 additions and 2 deletions

View file

@ -266,7 +266,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

@ -263,7 +263,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")
);