[ADF-4252] Added doc link fixing tool (#4461)

* [ADF-4252] Added basic fixer for link and image URLs

* [ADF-4252] Added full check to link fixing tool

* [ADF-4252] Manually replaced http Github doc URLs

* [ADF-4252] Fixed rel note doc links with tool
This commit is contained in:
Andy Stark
2019-03-19 22:17:30 +00:00
committed by Eugenio Romano
parent 5dd1d25371
commit 5c63b7c0f8
20 changed files with 527 additions and 306 deletions

View File

@@ -184,3 +184,32 @@ var Text = /** @class */ (function () {
return Text;
}());
exports.Text = Text;
var libNamesRegex = /content-services|core|extensions|insights|process-services|process-services-cloud/;
var Docset = /** @class */ (function () {
function Docset(mdCache) {
var _this = this;
this.docs = [];
var pathnames = Object.keys(mdCache);
pathnames.forEach(function (pathname) {
if (!pathname.match(/README/) &&
pathname.match(libNamesRegex)) {
var doc = new Root(mdCache[pathname].mdInTree);
doc.id = pathname.replace(/\\/g, '/');
_this.docs.push(doc);
}
});
}
Docset.prototype.documents = function (args) {
if (args['idFilter'] === '') {
return this.docs;
}
else {
return this.docs.filter(function (doc) { return doc.id.indexOf(args['idFilter'] + '/') !== -1; });
}
};
Docset.prototype.size = function () {
return this.docs.length;
};
return Docset;
}());
exports.Docset = Docset;