[ADF-3230] Changes to stop doc tools from updating files unnecessarily (#3519)

* [ADF-3230] Added basic change detector to doc tools

* [ADF-3230] Updates to type linker to fix before/after inconsistencies

* [ADF-3230] Fixed comparison error caused by adjacent text blocks

* [ADF-3230] Added basic change detector to doc tools

* [ADF-3230] Updates to type linker to fix before/after inconsistencies

* [ADF-3230] Fixed comparison error caused by adjacent text blocks

* [ADF-3230] Modified props tool to remove spaces from union types

* [ADF-3230] Made ToC tool before/after state consistent
This commit is contained in:
Andy Stark
2018-06-22 13:24:38 +01:00
committed by Eugenio Romano
parent 6584bc307e
commit 5a3ce3d299
12 changed files with 168 additions and 53 deletions

View File

@@ -61,6 +61,13 @@ var MDNav = /** @class */ (function () {
return h.type === "heading" && test(h);
}, index);
};
MDNav.prototype.headings = function (test, index) {
if (test === void 0) { test = function () { return true; }; }
if (index === void 0) { index = 0; }
return this.findAll(function (h) {
return h.type === "heading" && test(h);
}, index);
};
MDNav.prototype.html = function (test, index) {
if (test === void 0) { test = function () { return true; }; }
if (index === void 0) { index = 0; }
@@ -171,6 +178,28 @@ var MDNav = /** @class */ (function () {
enumerable: true,
configurable: true
});
Object.defineProperty(MDNav.prototype, "textValue", {
get: function () {
if (this.item) {
if (this.item["value"]) {
return this.item.value;
}
else if (this.item.children &&
(this.item.children.length > 0) &&
(this.item.children[0].type === "text")) {
return this.item.children[0].value;
}
else {
return "";
}
}
else {
return "";
}
},
enumerable: true,
configurable: true
});
return MDNav;
}());
exports.MDNav = MDNav;