fix for php 5.2
This commit is contained in:
+3
-1
@@ -64,7 +64,9 @@ $(document).ready(function () {
|
||||
span = '<span class="diff" />',
|
||||
cache = {};
|
||||
|
||||
Markdown.Extra.init(converter);
|
||||
Markdown.Extra.init(converter, {
|
||||
'extensions' : ["tables", "fenced_code_gfm", "def_list", "attr_list", "footnotes", "strikethrough", "newlines"]
|
||||
});
|
||||
|
||||
// 自动跟随
|
||||
converter.hooks.chain('postConversion', function (html) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -168,32 +168,6 @@
|
||||
};
|
||||
})($);
|
||||
|
||||
(function () {
|
||||
|
||||
Typecho.Markdown = function () {
|
||||
this.hooks = new Markdown.HookCollection();
|
||||
this.hooks.addNoop('postConversion');
|
||||
this.lastIt = null;
|
||||
};
|
||||
|
||||
Typecho.Markdown.prototype.makeHtml = function (text, preview) {
|
||||
var self = this;
|
||||
|
||||
if (this.lastIt) {
|
||||
clearTimeout(this.lastIt);
|
||||
this.lastIt = null;
|
||||
}
|
||||
|
||||
this.lastIt = setTimeout(function () {
|
||||
html = MarkdownText(text);
|
||||
preview(self.hooks.postConversion(html));
|
||||
}, 500);
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
|
||||
/**
|
||||
* TableDnD plug-in for JQuery, allows you to drag and drop table rows
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1755,6 +1755,10 @@ class ParsedownExtra extends Parsedown
|
||||
return $text;
|
||||
}
|
||||
|
||||
protected function sortFootnotes($A, $B) {
|
||||
return $A['number'] - $B['number'];
|
||||
}
|
||||
|
||||
#
|
||||
# ~
|
||||
#
|
||||
@@ -1777,9 +1781,7 @@ class ParsedownExtra extends Parsedown
|
||||
),
|
||||
);
|
||||
|
||||
usort($this->Definitions['Footnote'], function($A, $B) {
|
||||
return $A['number'] - $B['number'];
|
||||
});
|
||||
usort($this->Definitions['Footnote'], array($this, 'sortFootnotes'));
|
||||
|
||||
foreach ($this->Definitions['Footnote'] as $name => $Data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user