sprockets-dotjs 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/app/assets/javascripts/encode_html.js +2 -2
- data/lib/sprockets-dotjs/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Compile doT.JS templates (`jst.djs` extension) into rails `JST` env variable
|
4
4
|
|
5
|
-
Supports doT.JS partial feature by using Sprocket's `
|
5
|
+
Supports doT.JS partial feature by using Sprocket's `depend_on_asset` directive (support recursive partial dependency in `3.0`)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -16,7 +16,7 @@ And then execute:
|
|
16
16
|
|
17
17
|
## Usage
|
18
18
|
|
19
|
-
Put doT.js template files inside the `assets/javascript` directory and
|
19
|
+
Put doT.js template files inside the `assets/javascript` directory and use them by calling `JST["#{file_path}"](context)`
|
20
20
|
|
21
21
|
## Contributing
|
22
22
|
|
@@ -2,7 +2,7 @@ function encodeHTMLSource() {
|
|
2
2
|
var encodeHTMLRules = { "&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/'},
|
3
3
|
matchHTML = /&(?!#?\w+;)|<|>|"|'|\//g;
|
4
4
|
return function() {
|
5
|
-
return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m; })
|
5
|
+
return this ? this.replace(matchHTML, function(m) {return encodeHTMLRules[m] || m; }) : this;
|
6
6
|
};
|
7
7
|
}
|
8
|
-
String.prototype.encodeHTML = encodeHTMLSource();
|
8
|
+
String.prototype.encodeHTML = encodeHTMLSource();
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-dotjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sprockets
|