s4
changeset 979:084326d5ba19
FIX: JS return -1 when string-search fails...
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 29 May 2022 12:13:00 +0900 |
parents | 71528696780b |
children | f0b63223cb80 |
files | s4-main.js |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/s4-main.js Sun May 29 12:07:59 2022 +0900 1.2 +++ b/s4-main.js Sun May 29 12:13:00 2022 +0900 1.3 @@ -1052,7 +1052,7 @@ 1.4 if (text.startsWith("\>#")) { 1.5 let newline = text.indexOf("\n"); 1.6 let first, rest; 1.7 - if (newline) { 1.8 + if (newline > 0) { 1.9 first = text.substring(0, newline); 1.10 rest = text.substring(newline); 1.11 } else {