sc-docs 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+ /*global IO,Markdown,Koala,Smartdown*/
2
+ IO.include("plugins/smartdown/markdown.js");
3
+ IO.include("plugins/smartdown/koala.js");
4
+
5
+ var Smartdown = {
6
+ render: function(text) {
7
+ // first, attempt to determine indent level of content.
8
+ /**
9
+ this would be 0 spaces
10
+ two
11
+ 4, and so on.
12
+ */
13
+
14
+ var initial = text.match(/\n([ \t]+)/);
15
+ if (initial) {
16
+ text = text.replace(new RegExp("^" + initial[1], 'mg'), "");
17
+ }
18
+
19
+ if (text.match(/\n/)) text = new Showdown.converter().makeHtml(text);
20
+
21
+ text = text.replace(/<code>(#([^:\s]+)?)?:?\s*([^\0]+?)<\/code>/g, function(match, whitespace, lang, code) {
22
+ lang = lang || "js";
23
+ code = code.replace(/&amp;/g, "&").replace(/&gt;/g, ">").replace(/&lt;/g, "<");
24
+ return "<code class='syntax " + lang + "'>" + Koala.render(lang, code) + "</code>";
25
+ });
26
+ return text;
27
+ }
28
+ };
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sc-docs
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.2
5
+ version: 0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Majd Taby
@@ -11,8 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2011-05-19 00:00:00 -07:00
15
- default_executable:
14
+ date: 2011-05-24 00:00:00 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: thor
@@ -153,6 +152,15 @@ files:
153
152
  - vendor/jsdoc/app/plugins/frameworkPrototype.js
154
153
  - vendor/jsdoc/app/plugins/functionCall.js
155
154
  - vendor/jsdoc/app/plugins/publishSrcHilite.js
155
+ - vendor/jsdoc/app/plugins/smartdown.js
156
+ - vendor/jsdoc/app/plugins/smartdown/koala.js
157
+ - vendor/jsdoc/app/plugins/smartdown/koala/formatter.js
158
+ - vendor/jsdoc/app/plugins/smartdown/koala/formatters/html.js
159
+ - vendor/jsdoc/app/plugins/smartdown/koala/grammars/javascript.js
160
+ - vendor/jsdoc/app/plugins/smartdown/koala/grammars/ruby.js
161
+ - vendor/jsdoc/app/plugins/smartdown/koala/lexer.js
162
+ - vendor/jsdoc/app/plugins/smartdown/markdown.js
163
+ - vendor/jsdoc/app/plugins/smartdown/smartdown.js
156
164
  - vendor/jsdoc/app/plugins/symbolLink.js
157
165
  - vendor/jsdoc/app/plugins/tagParamConfig.js
158
166
  - vendor/jsdoc/app/plugins/tagSynonyms.js
@@ -209,7 +217,6 @@ files:
209
217
  - vendor/jsdoc/app/test/variable_redefine.js
210
218
  - vendor/jsdoc/changes.txt
211
219
  - vendor/jsdoc/conf/sample.conf
212
- has_rdoc: true
213
220
  homepage: http://sproutcore.com
214
221
  licenses: []
215
222
 
@@ -233,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
240
  requirements: []
234
241
 
235
242
  rubyforge_project:
236
- rubygems_version: 1.5.2
243
+ rubygems_version: 1.7.2
237
244
  signing_key:
238
245
  specification_version: 3
239
246
  summary: Docs Generator for SproutCore