Skip to content

Commit

Permalink
Fixed markdown support
Browse files Browse the repository at this point in the history
We should only relative require when
we are installing the package along with jade. Here
we use it for testing, but require that the user
has it installed
  • Loading branch information
tj committed Jul 8, 2010
1 parent d2be314 commit edc190b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "support/expresso"]
path = support/expresso
url = git://github.com/visionmedia/expresso.git
[submodule "deps/markdown-js"]
path = deps/markdown-js
[submodule "support/markdown"]
path = support/markdown
url = http://github.com/evilstreak/markdown-js.git
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ uninstall:
rm -f $(LIB_PREFIX)/jade.js

test:
@./support/expresso/bin/expresso -I lib test/*.js
@./support/expresso/bin/expresso -I lib -I support/markdown/lib test/*.js

test-cov:
@./support/expresso/bin/expresso -I lib --cov test/*.js
@./support/expresso/bin/expresso -I lib -I support/markdown/lib --cov test/*.js

api.html: lib/jade.js
@dox --title "Jade" \
Expand Down
6 changes: 3 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
- supports [Express JS](http://expressjs.com)
- no tag prefix
- filters
- :sass
- :less
- :markdown
- :sass must have [sass.js](http://github.com/visionmedia/sass.js) installed
- :less must have [less.js](http://github.com/cloudhead/less.js) installed
- :markdown must have [markdown-js](http://github.com/evilstreak/markdown-js) installed
- :cdata
- :javascript

Expand Down
2 changes: 1 addition & 1 deletion lib/jade.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ var filters = exports.filters = {

markdown: function(str){
str = str.replace(/\\n/g, '\n');
return require('../deps/markdown-js/lib/markdown').toHTML(str).replace(/\n/g, '\\n').replace(/'/g,''');
return require('markdown').toHTML(str).replace(/\n/g, '\\n').replace(/'/g,''');
}
};

Expand Down
2 changes: 1 addition & 1 deletion support/expresso
Submodule expresso updated 1 files
+6 −6 bin/expresso

0 comments on commit edc190b

Please sign in to comment.