diff options
| author | Misko Hevery | 2010-11-04 17:41:14 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-11-05 13:32:37 -0700 |
| commit | 3d6a099d6e40f1e12f6349843218987d472d0f3c (patch) | |
| tree | 5adf8b44fb57767ab6fcb3a046b3e421217dfdb2 /docs/collect.js | |
| parent | 8767e766d13b7d3a1e3b6b06f3030c843d3b19ba (diff) | |
| download | angular.js-3d6a099d6e40f1e12f6349843218987d472d0f3c.tar.bz2 | |
changed to showdown from markup. added validator overview
Diffstat (limited to 'docs/collect.js')
| -rw-r--r-- | docs/collect.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/collect.js b/docs/collect.js index c16366ab..04735985 100644 --- a/docs/collect.js +++ b/docs/collect.js @@ -4,7 +4,7 @@ var fs = require('fs'), spawn = require('child_process').spawn, mustache = require('mustache'), callback = require('callback'), - markdown = require('markdown'); + Showdown = require('showdown').Showdown; var documentation = { section:{}, @@ -99,7 +99,12 @@ function escapedHtmlTag(doc, name, value) { } function markdownTag(doc, name, value) { - doc[name] = markdown.toHTML(value.replace(/^#/gm, '##')); + doc[name] = markdown(value.replace(/^#/gm, '##')); +} + +function markdown(text) { + text = text.replace(/<angular\/>/gm, '<tt><angular/></tt>'); + return new Showdown.converter().makeHtml(text); } var TAG = { @@ -114,6 +119,8 @@ var TAG = { description: markdownTag, TODO: markdownTag, returns: markdownTag, + paramDescription: markdownTag, + exampleDescription: markdownTag, name: function(doc, name, value) { doc.name = value; doc.shortName = value.split(/\./).pop(); @@ -127,7 +134,8 @@ var TAG = { type: match[2], name: match[6] || match[5], 'default':match[7], - description:match[8]}; + description:value.replace(match[0], match[8]) + }; doc.param.push(param); if (!doc.paramFirst) { doc.paramFirst = param; |
