From 1c08f1a6b220eb6fd926a63ac7c8c6b3f8f9bdbf Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 21 Feb 2017 17:08:22 +0000 Subject: [PATCH] fix(aio): remove unused extractTitleFromGuides processor --- aio/transforms/angular.io-package/index.js | 1 - .../processors/extractTitleFromGuides.js | 24 ------------------- 2 files changed, 25 deletions(-) delete mode 100644 aio/transforms/angular.io-package/processors/extractTitleFromGuides.js diff --git a/aio/transforms/angular.io-package/index.js b/aio/transforms/angular.io-package/index.js index b36cef2232..f3eb4a219d 100644 --- a/aio/transforms/angular.io-package/index.js +++ b/aio/transforms/angular.io-package/index.js @@ -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')) diff --git a/aio/transforms/angular.io-package/processors/extractTitleFromGuides.js b/aio/transforms/angular.io-package/processors/extractTitleFromGuides.js deleted file mode 100644 index 1a4e6c3806..0000000000 --- a/aio/transforms/angular.io-package/processors/extractTitleFromGuides.js +++ /dev/null @@ -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]; - } -} \ No newline at end of file