@@ -290,7 +290,7 @@ class DartDoc {
290290 if (! file.existsSync ()) {
291291 return null ;
292292 }
293- Document doc = parse (file.readAsStringSync ());
293+ Document doc = parse (file.readAsBytesSync ());
294294 Element base = doc.querySelector ('base' );
295295 String baseHref;
296296 if (base != null ) {
@@ -301,6 +301,7 @@ class DartDoc {
301301 .map ((link) => link.attributes['href' ])
302302 .where ((href) => href != null )
303303 .toList ();
304+
304305 return new Tuple2 (stringLinks, baseHref);
305306 }
306307
@@ -312,6 +313,7 @@ class DartDoc {
312313 fullPath = path.normalize (fullPath);
313314 }
314315
316+ visited.add (fullPath);
315317 Tuple2 stringLinksAndHref = _getStringLinksAndHref (fullPath);
316318 if (stringLinksAndHref == null ) {
317319 _warn (package, PackageWarning .brokenLink, pathToCheck,
@@ -335,7 +337,6 @@ class DartDoc {
335337 String newFullPath = path.joinAll ([origin, newPathToCheck]);
336338 newFullPath = path.normalize (newFullPath);
337339 if (! visited.contains (newFullPath)) {
338- visited.add (newFullPath);
339340 _doCheck (package, origin, visited, newPathToCheck, pathToCheck,
340341 newFullPath);
341342 }
0 commit comments