mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update all references to "params.tokens" to "params.parsers.markdownit.tokens" for clarity.
This commit is contained in:
parent
5302ee45de
commit
4b27bac79b
15 changed files with 45 additions and 37 deletions
|
|
@ -273,7 +273,7 @@ module.exports.unorderedListStyleFor = function unorderedListStyleFor(token) {
|
|||
* @returns {void}
|
||||
*/
|
||||
function filterTokens(params, type, handler) {
|
||||
for (const token of params.tokens) {
|
||||
for (const token of params.parsers.markdownit.tokens) {
|
||||
if (token.type === type) {
|
||||
handler(token);
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ module.exports.getLineMetadata = function getLineMetadata(params) {
|
|||
filterTokens(params, "hr", (token) => {
|
||||
lineMetadata[token.map[0]][6] = true;
|
||||
});
|
||||
for (const token of params.tokens.filter(isMathBlock)) {
|
||||
for (const token of params.parsers.markdownit.tokens.filter(isMathBlock)) {
|
||||
for (let i = token.map[0]; i < token.map[1]; i++) {
|
||||
lineMetadata[i][7] = true;
|
||||
}
|
||||
|
|
@ -422,7 +422,7 @@ module.exports.forEachInlineChild = forEachInlineChild;
|
|||
// Calls the provided function for each heading's content
|
||||
module.exports.forEachHeading = function forEachHeading(params, handler) {
|
||||
let heading = null;
|
||||
for (const token of params.tokens) {
|
||||
for (const token of params.parsers.markdownit.tokens) {
|
||||
if (token.type === "heading_open") {
|
||||
heading = token;
|
||||
} else if (token.type === "heading_close") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue