fixed some stuff
This commit is contained in:
parent
d20e73e251
commit
227c045f87
3 changed files with 8 additions and 3 deletions
|
@ -100,7 +100,12 @@ let formatPostText = function(post) {
|
|||
let formatTypeStr = formats[formatType] || 'default';
|
||||
|
||||
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 {
|
||||
let content = post[i];
|
||||
content.format = formatTypeStr;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<style>
|
||||
#mainChat {
|
||||
height: calc(100% - 160px);
|
||||
height: 100%;
|
||||
width: calc(100vw - 30px);
|
||||
padding: 15px;
|
||||
overflow: auto;
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<b>#post</b> replies to a post by ID
|
||||
</p>
|
||||
<p>
|
||||
<b>%chat</b> links to a chatroom
|
||||
<b>%post</b> links to a chatroom
|
||||
</p>
|
||||
<p>
|
||||
<b>*x*</b> produces italic text
|
||||
|
|
Loading…
Reference in a new issue