transformers
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -0,1 +1,5 @@ | ||
## 1.8.0 - 2013-01-30 | ||
- **highlight** (needs tests) | ||
## 1.7.0 - 2013-01-30 | ||
@@ -2,0 +6,0 @@ |
@@ -502,7 +502,27 @@ var dirname = require('path').dirname; | ||
async: function (str, options, cb) { | ||
this.engine.convertHtml(str, options, cb); | ||
return this.cache(options) || this.cache(options, this.engine.convertHtml(str, options, cb)); | ||
} | ||
}); | ||
exports['highlight'] = new Transformer({ | ||
name: 'highlight', | ||
engines: ['highlight.js'], | ||
outputFormat: 'xml', | ||
sync: function (str, options, cb) { | ||
if (this.cache(options)) return this.cache(options); | ||
if (options.lang) { | ||
try { | ||
return this.cache(options, this.engine.highlight(options.lang, str).value); | ||
} catch (ex) {} | ||
} | ||
if (options.auto || !options.lang) { | ||
try { | ||
return this.cache(options, this.engine.highlightAuto(str).value); | ||
} catch (ex) {} | ||
} | ||
return this.cache(options, str); | ||
} | ||
}); | ||
/** | ||
@@ -509,0 +529,0 @@ * Marker transformers (they don't actually apply a transformation, but let you declare the 'outputFormat') |
{ | ||
"name": "transformers", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "String/Data transformations for use in templating libraries, static site generators and web frameworks", | ||
@@ -5,0 +5,0 @@ "main": "lib/transformers.js", |
@@ -118,2 +118,3 @@ # transformers | ||
2. qejs | ||
3. html2jade | ||
@@ -120,0 +121,0 @@ The following transformations sometimes throw an exception if run syncronously, typically they only throw an exception if you are doing something like including another file. If you are not doing the things that cause them to fail then they are consistently safe to use syncronously. |
@@ -0,0 +0,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46959
940
130