Merge pull request #175 from one-some/token-streaming-newline-fix
Fix arbitrary newline insertion when token streaming is enabled
This commit is contained in:
commit
56783a1257
|
@ -2351,7 +2351,12 @@ $(document).ready(function(){
|
||||||
var element = game_text.children('#n' + index);
|
var element = game_text.children('#n' + index);
|
||||||
if(element.length) {
|
if(element.length) {
|
||||||
unbindGametext();
|
unbindGametext();
|
||||||
if((element[0].nextSibling === null || element[0].nextSibling.nodeType !== 1 || element[0].nextSibling.tagName !== "CHUNK") && element[0].previousSibling !== null && element[0].previousSibling.tagName === "CHUNK") {
|
if(
|
||||||
|
(element[0].nextSibling === null || element[0].nextSibling.nodeType !== 1 || element[0].nextSibling.tagName !== "CHUNK")
|
||||||
|
&& element[0].previousSibling !== null
|
||||||
|
&& element[0].previousSibling.tagName === "CHUNK"
|
||||||
|
&& !$("#setoutputstreaming")[0].checked
|
||||||
|
) {
|
||||||
element[0].previousSibling.appendChild(document.createElement("br"));
|
element[0].previousSibling.appendChild(document.createElement("br"));
|
||||||
}
|
}
|
||||||
element.remove(); // Remove the chunk
|
element.remove(); // Remove the chunk
|
||||||
|
|
Loading…
Reference in New Issue