UI: cat: proper line breaks when showing .js, .script, or .txt files (#192)

Currently, the HTML line break sequence `<br /><br />` is hardcoded into the dialog box message when showing the content of these file types: ".js", ".script", and ".txt".  By default, the function `dialogBoxCreate()` currently assumes that its first parameter is not HTML, but a text string, so whatever is in the string will appear in the dialog box.  Use the newline character instead for line break.
This commit is contained in:
quacksouls
2022-11-04 22:23:33 +11:00
committed by GitHub
parent 6ac04717fe
commit 55b2cbb549
2 changed files with 2 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ export class TextFile {
/** Shows the content to the user via the game's dialog box. */
show(): void {
dialogBoxCreate(`${this.fn}<br /><br />${this.text}`);
dialogBoxCreate(`${this.fn}\n\n${this.text}`);
}
/** Serialize the current file to a JSON save state. */