catch markdown table-fmt error; closes #699

This commit is contained in:
ed 2025-08-27 18:09:27 +00:00
parent 0b50fde305
commit 4c042b3c82

View file

@ -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),