Mercurial > hgrepos > hgweb.cgi > s4
changeset 979:084326d5ba19 draft
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 wrap: on
line diff
--- a/s4-main.js Sun May 29 12:07:59 2022 +0900 +++ b/s4-main.js Sun May 29 12:13:00 2022 +0900 @@ -1052,7 +1052,7 @@ if (text.startsWith("\>#")) { let newline = text.indexOf("\n"); let first, rest; - if (newline) { + if (newline > 0) { first = text.substring(0, newline); rest = text.substring(newline); } else {