mirror of
https://github.com/9001/copyparty.git
synced 2025-09-28 12:42:26 -06:00
catch markdown table-fmt error; closes #699
This commit is contained in:
parent
0b50fde305
commit
4c042b3c82
|
@ -697,8 +697,14 @@ function reLastIndexOf(txt, ptn, end) {
|
|||
// table formatter
|
||||
function fmt_table(e) {
|
||||
if (e) e.preventDefault();
|
||||
//dom_tbox.className = '';
|
||||
|
||||
try {
|
||||
fmt_table2();
|
||||
}
|
||||
catch (ex) {
|
||||
return toast.err(7, 'table-format (CTRL-K) failed:\n' + ex);
|
||||
}
|
||||
}
|
||||
function fmt_table2() {
|
||||
var txt = dom_src.value,
|
||||
ofs = dom_src.selectionStart,
|
||||
//o0 = txt.lastIndexOf('\n\n', ofs),
|
||||
|
|
Loading…
Reference in a new issue