git.iko.soy/typeable/remark-validate-links
on main help sign in
Add support for future changes in unified
commitfab6a899d8443ead2d39827b630b40cb87ce3ad2 authorTitus Wormer <tituswormer@gmail.com> dateFri 18 Sep 2015, 16:38 (11 years ago) parent0b6c35b
1 file changed+4−2
index.js+4−2
index.js+4−2
@@ -120,7 +120,8 @@ function gatherReferences(file, project) {
120120 var cache = {};
121121 var filePath = file.filePath();
122122 var directory = file.directory;
123− var ast = file.namespace('mdast').ast;
123+ var space = file.namespace('mdast');
124+ var ast = space.tree || space.ast;
124125 var getDefinition;
125126 var prefix = '';
126127
@@ -300,7 +301,8 @@ function gatherExposedFactory() {
300301 */
301302 function gather(file) {
302303 var filePath = file.filePath();
303− var ast = file.namespace('mdast').ast;
304+ var space = file.namespace('mdast');
305+ var ast = space.tree || space.ast;
304306
305307 /*
306308 * Ignore files without AST or filename.