s4
changeset 977:eb0ffd3b37c0
Fix for single line reply
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 29 May 2022 12:06:46 +0900 |
parents | ae6c5df09f22 |
children | 71528696780b |
files | s4-main.js |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/s4-main.js Sun May 29 08:36:39 2022 +0900 1.2 +++ b/s4-main.js Sun May 29 12:06:46 2022 +0900 1.3 @@ -1051,8 +1051,15 @@ 1.4 let text = td.innerHTML; 1.5 if (text.startsWith("\>#")) { 1.6 let newline = text.indexOf("\n"); 1.7 - let first = text.substring(0, newline), 1.8 + let first = 1.9 rest = text.substring(newline); 1.10 + if (newline) { 1.11 + first = text.substring(0, newline); 1.12 + rest = text.substring(newline); 1.13 + } else { 1.14 + first = text; 1.15 + rest = ""; 1.16 + } 1.17 td.innerHTML = first.replace( 1.18 /#([0-9]+)/g, 1.19 (match, start, whole) => {