Improve formula evaluation. Fix #201

A past change added support for html comments for tables, however, this
fails when the formula line happens to match the format of html comments
This commit is contained in:
Dhruva Sagar
2021-05-30 03:53:41 +05:30
parent 5150f1ec06
commit 35e9fbf64c

View File

@@ -1,12 +1,12 @@
" Private Functions {{{1
function! s:IsHTMLComment(line) "{{{2
return getline(a:line) =~# '^\s*<!--'
endfunction
function! s:IsFormulaLine(line) "{{{2
return getline(a:line) =~# 'tmf: '
endfunction
function! s:IsHTMLComment(line) "{{{2
return !s:IsFormulaLine(a:line) && getline(a:line) =~# '^\s*<!--'
endfunction
" Public Functions {{{1
function! tablemode#spreadsheet#formula#Add(...) "{{{2
let fr = a:0 ? a:1 : input('f=')