fixed some stuff

This commit is contained in:
tdgmcode 2023-03-15 15:28:17 -04:00
parent d20e73e251
commit 227c045f87
3 changed files with 8 additions and 3 deletions

View file

@ -100,7 +100,12 @@ let formatPostText = function(post) {
let formatTypeStr = formats[formatType] || 'default'; let formatTypeStr = formats[formatType] || 'default';
if (post[i] === post[i] + '') { if (post[i] === post[i] + '') {
newArr.push({'type': 'text', 'format': formatTypeStr, 'content': post[i]}) let lastEntry = (newArr.length > 0) ? newArr[newArr.length - 1] : {};
if (lastEntry.type == 'text' && lastEntry.format == formatTypeStr) {
newArr[newArr.length - 1].content += post[i];
} else {
newArr.push({'type': 'text', 'format': formatTypeStr, 'content': post[i]})
}
} else { } else {
let content = post[i]; let content = post[i];
content.format = formatTypeStr; content.format = formatTypeStr;

View file

@ -50,7 +50,7 @@
<style> <style>
#mainChat { #mainChat {
height: calc(100% - 160px); height: 100%;
width: calc(100vw - 30px); width: calc(100vw - 30px);
padding: 15px; padding: 15px;
overflow: auto; overflow: auto;

View file

@ -91,7 +91,7 @@
<b>#post</b> replies to a post by ID <b>#post</b> replies to a post by ID
</p> </p>
<p> <p>
<b>%chat</b> links to a chatroom <b>%post</b> links to a chatroom
</p> </p>
<p> <p>
<b>*x*</b> produces italic text <b>*x*</b> produces italic text