fix(aio): remove unused extractTitleFromGuides processor
This commit is contained in:
parent
dfed388139
commit
1c08f1a6b2
|
@ -38,7 +38,6 @@ module.exports =
|
||||||
.processor(require('./processors/convertPrivateClassesToInterfaces'))
|
.processor(require('./processors/convertPrivateClassesToInterfaces'))
|
||||||
.processor(require('./processors/generateNavigationDoc'))
|
.processor(require('./processors/generateNavigationDoc'))
|
||||||
.processor(require('./processors/generateKeywords'))
|
.processor(require('./processors/generateKeywords'))
|
||||||
.processor(require('./processors/extractTitleFromGuides'))
|
|
||||||
.processor(require('./processors/createOverviewDump'))
|
.processor(require('./processors/createOverviewDump'))
|
||||||
.processor(require('./processors/checkUnbalancedBackTicks'))
|
.processor(require('./processors/checkUnbalancedBackTicks'))
|
||||||
.processor(require('./processors/addNotYetDocumentedProperty'))
|
.processor(require('./processors/addNotYetDocumentedProperty'))
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
var _ = require('lodash');
|
|
||||||
|
|
||||||
module.exports = function extractTitleFromGuides() {
|
|
||||||
|
|
||||||
return {
|
|
||||||
$runAfter: ['processing-docs'],
|
|
||||||
$runBefore: ['docs-processed'],
|
|
||||||
$process: function(docs) {
|
|
||||||
_(docs).forEach(function(doc) {
|
|
||||||
if (doc.docType === 'guide') {
|
|
||||||
doc.name = doc.name || getNameFromHeading(doc.description);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
function getNameFromHeading(text) {
|
|
||||||
var match = /^\s*#\s*(.*)/.exec(text);
|
|
||||||
if (match) {
|
|
||||||
return match[1];
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue