From 3d6a099d6e40f1e12f6349843218987d472d0f3c Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 4 Nov 2010 17:41:14 -0700 Subject: changed to showdown from markup. added validator overview --- docs/collect.js | 14 +++++++++++--- docs/filter.template | 6 +++--- docs/index.html | 4 ++-- docs/overview.template | 2 +- docs/spec/collectSpec.js | 38 ++++++++++++++++++++++++++++++++------ docs/validator.template | 27 +++++++++++++++++++++++++++ docs/widget.template | 7 ++++--- 7 files changed, 80 insertions(+), 18 deletions(-) create mode 100644 docs/validator.template (limited to 'docs') 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(//gm, '<angular/>'); + 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; diff --git a/docs/filter.template b/docs/filter.template index 0602aff9..9375f422 100644 --- a/docs/filter.template +++ b/docs/filter.template @@ -1,4 +1,7 @@

{{name}}

+

Description

+{{{description}}} +

Usage

In HTML Template Binding

@@ -25,9 +28,6 @@ angular.filter.{{shortName}}({{paramFirst.name}}{{#paramRest}}, {{name}}{{/param

CSS

{{{css}}} -

Description

-{{{description}}} - {{{example}}} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index a2cad87e..2f5a8234 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,8 +4,8 @@ - - + +