From bebd4ce944c31737a79c2301b8099072e32bd6a3 Mon Sep 17 00:00:00 2001 From: Kim Ravn Hansen Date: Tue, 21 Oct 2025 23:11:46 +0200 Subject: [PATCH] Tweaks --- scenes/gameLoop/gameScene.js | 2 +- utils/crackdown.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scenes/gameLoop/gameScene.js b/scenes/gameLoop/gameScene.js index 80cb94f..a7294fb 100755 --- a/scenes/gameLoop/gameScene.js +++ b/scenes/gameLoop/gameScene.js @@ -81,6 +81,6 @@ class GameScenePlaceholderPrompt extends Prompt { = Welcome to Hovedstad -(( type :quit to quit )) +((type :quit to quit)) `; } diff --git a/utils/crackdown.js b/utils/crackdown.js index c01315c..686b15d 100755 --- a/utils/crackdown.js +++ b/utils/crackdown.js @@ -22,15 +22,15 @@ const htmlEscapeRegex = /[&<>"'`]/g; // used to escape html characters * The order of the elements of this array matters. */ const opcodes = [ - ["(^|\\n)=", "($|\\n)", "$1

$2

$3"], - ["(^|\\n)==", "($|\\n)", "$1

$2

$3"], - ["---", "---", "$1"], - ["___", "___", "$1"], - ["(?:[,]{3})", "(?:[,]{3})", "$1"], - ["(?:[(]{2})", "(?:[)]{2})", "$1"], - ["_", "_", "$1"], - ["\\*", "\\*", "$1"], - ["\\[\\[([a-zA-Z0-9_ ]+)\\[\\[", "\\]\\]", "$2"], + ["(^|\\n)=", "($|\\n)", "$1

$2

$3"], // lines with large headline begins with = + ["(^|\\n)==", "($|\\n)", "$1

$2

$3"], // lines with sub-headline begins with == + ["---", "---", "$1"], // ---trike through--- + ["___", "___", "$1"], // ___underline___ + ["(?:[,]{3})", "(?:[,]{3})", "$1"], // ,,,undercurl,,, + ["(?:[(]{2})", "(?:[)]{2})", "$1"], // ((faint text)) + ["_", "_", "$1"], // _italic_ + ["\\*", "\\*", "$1"], // *bold* + ["\\[\\[([a-zA-Z0-9_ ]+)\\[\\[", "\\]\\]", "$2"], // [[custom_class[[text with custom class]] ]; /** @type{Array.Array.} */ const regexes = [];