Comparing version 0.8.1 to 0.8.2
0.8.2 / 2011-03-07 | ||
================== | ||
* Added markdown, discount, and markdown-js support to `:markdown`. Closes #160 | ||
* Removed `:discount` | ||
0.8.1 / 2011-03-04 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -62,3 +62,19 @@ | ||
markdown: function(str){ | ||
var md = require('markdown'); | ||
var md; | ||
// support markdown / discount | ||
try { | ||
md = require('markdown'); | ||
} catch (err){ | ||
try { | ||
md = require('discount'); | ||
} catch (err) { | ||
try { | ||
md = require('markdown-js'); | ||
} catch (err) { | ||
throw new Error('Cannot find markdown library, install markdown or discount'); | ||
} | ||
} | ||
} | ||
str = str.replace(/\\n/g, '\n'); | ||
@@ -69,12 +85,2 @@ return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); | ||
/** | ||
* Transform markdown to html. | ||
*/ | ||
discount: function(str){ | ||
var md = require('discount'); | ||
str = str.replace(/\\n/g, '\n'); | ||
return md.parse(str).replace(/\n/g, '\\n').replace(/'/g,'''); | ||
}, | ||
/** | ||
* Transform coffeescript to javascript. | ||
@@ -81,0 +87,0 @@ */ |
@@ -20,3 +20,3 @@ | ||
exports.version = '0.8.1'; | ||
exports.version = '0.8.2'; | ||
@@ -23,0 +23,0 @@ /** |
{ | ||
"name": "jade", | ||
"description": "Jade template engine", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca>", | ||
@@ -6,0 +6,0 @@ "main": "./index.js", |
Sorry, the diff of this file is not supported yet
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
66304
1744