mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
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:
parent
aa76deec74
commit
caa98a8dde
@ -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
|
||||
|
@ -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') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user