fix(aio): remove unused extractTitleFromGuides processor

This commit is contained in:
Peter Bacon Darwin 2017-02-21 17:08:22 +00:00 committed by Igor Minar
parent dfed388139
commit 1c08f1a6b2
2 changed files with 0 additions and 25 deletions

View File

@ -38,7 +38,6 @@ module.exports =
.processor(require('./processors/convertPrivateClassesToInterfaces'))
.processor(require('./processors/generateNavigationDoc'))
.processor(require('./processors/generateKeywords'))
.processor(require('./processors/extractTitleFromGuides'))
.processor(require('./processors/createOverviewDump'))
.processor(require('./processors/checkUnbalancedBackTicks'))
.processor(require('./processors/addNotYetDocumentedProperty'))

View File

@ -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];
}
}