🐛 Negative numbers are treated as positive numbers when calculating template field values https://github.com/siyuan-note/siyuan/issues/11446
This commit is contained in:
parent
0ad0d416c4
commit
b670cdb29a
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ func Convert2Float(s string) (float64, bool) {
|
|||
s = strings.ReplaceAll(s, ",", "")
|
||||
buf := bytes.Buffer{}
|
||||
for _, r := range s {
|
||||
if unicode.IsDigit(r) || '.' == r {
|
||||
if unicode.IsDigit(r) || '.' == r || '-' == r {
|
||||
buf.WriteRune(r)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue