mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(extensions): support for old extension loading mechanism
This commit is contained in:
parent
7deea25a5e
commit
95ed7c682e
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -151,6 +151,14 @@ showdown.Converter = function (converterOptions) {
|
|||
}
|
||||
}
|
||||
|
||||
// This is a dirty workaround to maintain backwards extension compatibility
|
||||
// We define a self var (which is a copy of this) and inject the makeHtml function
|
||||
// directly to it. This ensures a full converter object is available when iterating over extensions
|
||||
// We should rewrite the extension loading mechanism and use some kind of interface or decorator pattern
|
||||
// and inject the object reference there instead.
|
||||
var self = this;
|
||||
self.makeHtml = makeHtml;
|
||||
|
||||
// Parse options
|
||||
if (options.extensions) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user