aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Bacon Darwin2014-03-07 11:18:55 +0000
committerBrian Ford2014-03-07 15:09:01 -0800
commit2eff3267819737d1cc457800fd86a846acbf1b1e (patch)
tree35882c063636d31a27ad15be54688855bad209cb
parent50ce5746a7265b403ca47e9a8d149c6a8e88e745 (diff)
downloadangular.js-2eff3267819737d1cc457800fd86a846acbf1b1e.tar.bz2
chore(doc-gen): add inline @type tag
-rw-r--r--docs/config/index.js4
-rw-r--r--docs/config/inline-tag-defs/type.js12
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>';
+ };
+ }
+};