bug fixes:

+ fix bug with forEach extensions within client-side handling (browser)
+ update README to specify extension as array for client-side usage (same as server)
This commit is contained in:
Pascal Deschenes 2012-10-30 16:55:18 -04:00
parent aa76deec74
commit caa98a8dde
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ Showdown allows additional functionality to be loaded via extensions.
<script src="src/showdown.js" />
<script src="src/extensions/twitter.js" />
var converter = new Showdown().converter({ extensions: 'twitter' });
var converter = new Showdown().converter({ extensions: ['twitter'] });
```
### Server-side Extension Usage

View File

@ -143,7 +143,7 @@ if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof req
if (converter_options && converter_options.extensions) {
// Iterate over each plugin
converter_options.extensions.forEach(function(plugin){
forEach(converter_options.extensions, function(plugin){
// Assume it's a bundled plugin if a string is given
if (typeof plugin === 'string') {