mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
a bug about options
Ensure it can traverse the extensions list
This commit is contained in:
parent
c579d08c9a
commit
aa78a8996d
|
@ -219,10 +219,12 @@ if (converter_options && converter_options.extensions) {
|
|||
|
||||
var self = this;
|
||||
|
||||
var extensionList = converter_options.extensions;
|
||||
|
||||
// if a string is given like this new Showdown.converter({ extensions: 'github' })
|
||||
// Ensure it can traverse the extensions list
|
||||
if(typeof converter_options.extensions === 'string'){
|
||||
converter_options.extensions = [converter_options.extensions];
|
||||
if(typeof extensionList === 'string'){
|
||||
converter_options.extensions = [extensionList];
|
||||
}
|
||||
|
||||
// Iterate over each plugin
|
||||
|
|
Loading…
Reference in New Issue
Block a user