mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 09:46:30 -05:00
Fixed autocomplete for code block should only show up after type at least one char, writeHistory when page unload to avoid some other occasions.
This commit is contained in:
parent
d14c5bdc9c
commit
c473033f45
1 changed files with 2 additions and 2 deletions
|
@ -386,7 +386,7 @@ $(window).resize(function () {
|
||||||
});
|
});
|
||||||
//when page unload
|
//when page unload
|
||||||
$(window).unload(function () {
|
$(window).unload(function () {
|
||||||
//na
|
writeHistory(ui.area.markdown);
|
||||||
});
|
});
|
||||||
$(window).error(function () {
|
$(window).error(function () {
|
||||||
setNeedRefresh();
|
setNeedRefresh();
|
||||||
|
@ -1863,7 +1863,7 @@ $(editor.getInputField())
|
||||||
},
|
},
|
||||||
{ // Code block language strategy
|
{ // Code block language strategy
|
||||||
langs: supportCodeModes,
|
langs: supportCodeModes,
|
||||||
match: /(^|\n)```(\w*)$/,
|
match: /(^|\n)```(\w+)$/,
|
||||||
search: function (term, callback) {
|
search: function (term, callback) {
|
||||||
callback($.map(this.langs, function (lang) {
|
callback($.map(this.langs, function (lang) {
|
||||||
return lang.indexOf(term) === 0 ? lang : null;
|
return lang.indexOf(term) === 0 ? lang : null;
|
||||||
|
|
Loading…
Reference in a new issue