From 556e8ca0f36c6c4816a0db51eff5c19cbffd6d3e Mon Sep 17 00:00:00 2001 From: "Hallvord R. M. Steen" Date: Thu, 1 Oct 2015 13:29:23 +0200 Subject: [PATCH] Fix typo in example script This method has a tokens argument in plural, but in the body it says token. Looks like a bug.. --- docs/architecture.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index d69cd5c..13fcf03 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -168,12 +168,12 @@ var iterator = require('markdown-it-for-inline'); var md = require('markdown-it')() .use(iterator, 'url_new_win', 'link_open', function (tokens, idx) { - var aIndex = token[idx].attrIndex('target'); + var aIndex = tokens[idx].attrIndex('target'); if (aIndex < 0) { - token[idx].attrPush(['target', '_blank']); + tokens[idx].attrPush(['target', '_blank']); } else { - token[idx].attrs[aIndex][1] = '_blank'; + tokens[idx].attrs[aIndex][1] = '_blank'; } }); ```