summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-07-17 00:06:05 +0800
committerWu Cheng-Han2015-07-17 00:11:10 +0800
commitc473033f45b8636c662eb9788fd5d460fad4079c (patch)
treeb9342b7e2fe7a3fcdcbfcb81223b4abba6f6c60b /public/js/index.js
parentd14c5bdc9cabf632262067466ef02374cee496cd (diff)
Fixed autocomplete for code block should only show up after type at least one char, writeHistory when page unload to avoid some other occasions.
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 4068d59b..26fc0cc8 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -386,7 +386,7 @@ $(window).resize(function () {
});
//when page unload
$(window).unload(function () {
- //na
+ writeHistory(ui.area.markdown);
});
$(window).error(function () {
setNeedRefresh();
@@ -1863,7 +1863,7 @@ $(editor.getInputField())
},
{ // Code block language strategy
langs: supportCodeModes,
- match: /(^|\n)```(\w*)$/,
+ match: /(^|\n)```(\w+)$/,
search: function (term, callback) {
callback($.map(this.langs, function (lang) {
return lang.indexOf(term) === 0 ? lang : null;