mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
committed by
Eugenio Romano
parent
5dd1d25371
commit
5c63b7c0f8
@@ -246,4 +246,41 @@ export class Text {
|
||||
value(): String {
|
||||
return this.orig.value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let libNamesRegex = /content-services|core|extensions|insights|process-services|process-services-cloud/;
|
||||
|
||||
|
||||
export class Docset {
|
||||
public docs: Root[];
|
||||
|
||||
constructor(mdCache) {
|
||||
this.docs = [];
|
||||
|
||||
let pathnames = Object.keys(mdCache);
|
||||
|
||||
pathnames.forEach(pathname => {
|
||||
|
||||
if (!pathname.match(/README/) &&
|
||||
pathname.match(libNamesRegex)
|
||||
) {
|
||||
let doc = new Root(mdCache[pathname].mdInTree);
|
||||
doc.id = pathname.replace(/\\/g, '/');
|
||||
this.docs.push(doc);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
documents(args): Root[] {
|
||||
if (args['idFilter'] === '') {
|
||||
return this.docs;
|
||||
} else {
|
||||
return this.docs.filter(doc => doc.id.indexOf(args['idFilter'] + '/') !== -1);
|
||||
}
|
||||
}
|
||||
|
||||
size(): number {
|
||||
return this.docs.length;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user