From 02cc2b2014f790a482f8f35c7d3045538cb08955 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Fri, 7 Mar 2014 05:34:13 +0000 Subject: chore(doc-gen): fix error-doc processor The meta-data should be parsed from the name not the id. --- docs/config/processors/error-docs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/config/processors/error-docs.js b/docs/config/processors/error-docs.js index 3fed96c5..2543190d 100644 --- a/docs/config/processors/error-docs.js +++ b/docs/config/processors/error-docs.js @@ -22,6 +22,12 @@ module.exports = { _.forEach(docs, function(doc) { if ( doc.docType === 'error' ) { + // Parse out the error info from the id + parts = doc.name.split(':'); + doc.namespace = parts[0]; + doc.name = parts[1]; + + var namespaceDoc = errorNamespaces[doc.namespace]; if ( !namespaceDoc ) { // First time we came across this namespace, so create a new one -- cgit v1.2.3