From 1ba8c2a33a2855b5c56aaaa79f402aa5196cc018 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 1 Nov 2010 16:57:55 -0700 Subject: more documentation for filters --- docs/collect.js | 6 +++++- docs/filter.template | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/collect.js b/docs/collect.js index a3c2a25c..a7a22a09 100644 --- a/docs/collect.js +++ b/docs/collect.js @@ -88,13 +88,17 @@ function valueTag(doc, name, value) { doc[name] = value; } +function escapedHtmlTag(doc, name, value) { + doc[name] = value.replace(/&/g, '&').replace(//g, '>'); +} + function markdownTag(doc, name, value) { doc[name] = markdown.toHTML(value); } var TAG = { ngdoc: valueTag, - example: valueTag, + example: escapedHtmlTag, scenario: valueTag, namespace: valueTag, css: valueTag, diff --git a/docs/filter.template b/docs/filter.template index 677a8785..f9005782 100644 --- a/docs/filter.template +++ b/docs/filter.template @@ -29,5 +29,5 @@ angular.filter.{{shortName}}({{paramFirst.name}}{{#paramRest}}, {{name}}{{/param {{{description}}} -{{example}} +{{{example}}} \ No newline at end of file -- cgit v1.2.3