From 2eff3267819737d1cc457800fd86a846acbf1b1e Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Fri, 7 Mar 2014 11:18:55 +0000 Subject: chore(doc-gen): add inline @type tag --- docs/config/index.js | 4 ++++ docs/config/inline-tag-defs/type.js | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 docs/config/inline-tag-defs/type.js diff --git a/docs/config/index.js b/docs/config/index.js index 9dfa4abf..5aca987a 100644 --- a/docs/config/index.js +++ b/docs/config/index.js @@ -25,6 +25,10 @@ module.exports = function(config) { require('./tag-defs/tutorial-step') ]); + config.append('processing.inlineTagDefinitions', [ + require('./inline-tag-defs/type') + ]); + config.set('processing.search.ignoreWordsFile', path.resolve(packagePath, 'ignore.words')); config.prepend('rendering.templateFolders', [ diff --git a/docs/config/inline-tag-defs/type.js b/docs/config/inline-tag-defs/type.js new file mode 100644 index 00000000..b0a11b5a --- /dev/null +++ b/docs/config/inline-tag-defs/type.js @@ -0,0 +1,12 @@ +var typeClassFilter = require('dgeni-packages/ngdoc/rendering/filters/type-class'); +var encoder = new require('node-html-encoder').Encoder(); + +module.exports = { + name: 'type', + description: 'Replace with markup that displays a nice type', + handlerFactory: function() { + return function(doc, tagName, tagDescription) { + return ''+encoder.htmlEncode(tagDescription) + ''; + }; + } +}; -- cgit v1.2.3