diff options
| author | Peter Bacon Darwin | 2014-03-07 11:18:55 +0000 | 
|---|---|---|
| committer | Peter Bacon Darwin | 2014-03-07 11:19:17 +0000 | 
| commit | 0b4a41af58fbc75122e18146a890a0a7c8dbd947 (patch) | |
| tree | dcd2216dc9f6782667bd9a322be595e672d90ed7 | |
| parent | 0e066693f21a333cbafe6c3f2877a52843605a1b (diff) | |
| download | angular.js-0b4a41af58fbc75122e18146a890a0a7c8dbd947.tar.bz2 | |
chore(doc-gen): add inline @type tag
| -rw-r--r-- | docs/config/index.js | 4 | ||||
| -rw-r--r-- | docs/config/inline-tag-defs/type.js | 12 | 
2 files changed, 16 insertions, 0 deletions
| 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 '<a href="" class="' + typeClassFilter.process(tagDescription) + '">'+encoder.htmlEncode(tagDescription) + '</a>'; +    }; +  } +}; | 
