diff --git a/CHANGELOG.md b/CHANGELOG.md index ac0b1a94..d6105149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [13.3.2](https://github.com/seleb/bitsy-hacks/compare/v13.3.1...v13.3.2) (2020-07-24) + + +### Bug Fixes + +* dialog tag not parsing `(tag "")` correctly ([#161](https://github.com/seleb/bitsy-hacks/issues/161)) ([7206644](https://github.com/seleb/bitsy-hacks/commit/72066447b0b5dec6341d490d459590bc04c662c1)) + ## [13.3.1](https://github.com/seleb/bitsy-hacks/compare/v13.3.0...v13.3.1) (2020-07-24) diff --git a/dist/bitsymuse.js b/dist/bitsymuse.js index a20fe316..eb0cbc35 100644 --- a/dist/bitsymuse.js +++ b/dist/bitsymuse.js @@ -283,7 +283,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/character-portraits-animated.js b/dist/character-portraits-animated.js index 46423773..85c48927 100644 --- a/dist/character-portraits-animated.js +++ b/dist/character-portraits-animated.js @@ -1045,7 +1045,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/character-portraits.js b/dist/character-portraits.js index e3d2a9ba..cb7c4a0b 100644 --- a/dist/character-portraits.js +++ b/dist/character-portraits.js @@ -274,7 +274,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/dialog-audio-vocal-synth.js b/dist/dialog-audio-vocal-synth.js index 8a2b2fca..da34f0e5 100644 --- a/dist/dialog-audio-vocal-synth.js +++ b/dist/dialog-audio-vocal-synth.js @@ -967,7 +967,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/dialog-jump.js b/dist/dialog-jump.js index ff1734fb..e84d6ae3 100644 --- a/dist/dialog-jump.js +++ b/dist/dialog-jump.js @@ -248,7 +248,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/dialog-pause.js b/dist/dialog-pause.js index 66e89000..ec7c82e7 100644 --- a/dist/dialog-pause.js +++ b/dist/dialog-pause.js @@ -226,7 +226,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/dialog-prompt.js b/dist/dialog-prompt.js index 6388143f..57116222 100644 --- a/dist/dialog-prompt.js +++ b/dist/dialog-prompt.js @@ -264,7 +264,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/edit-dialog-from-dialog.js b/dist/edit-dialog-from-dialog.js index cc5a37dc..81c809c5 100644 --- a/dist/edit-dialog-from-dialog.js +++ b/dist/edit-dialog-from-dialog.js @@ -259,7 +259,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/edit-image-from-dialog.js b/dist/edit-image-from-dialog.js index cd687337..387eecb7 100644 --- a/dist/edit-image-from-dialog.js +++ b/dist/edit-image-from-dialog.js @@ -288,7 +288,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/edit-player-from-dialog.js b/dist/edit-player-from-dialog.js index fee8d024..d37798dc 100644 --- a/dist/edit-player-from-dialog.js +++ b/dist/edit-player-from-dialog.js @@ -261,7 +261,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/edit-room-from-dialog.js b/dist/edit-room-from-dialog.js index 686ceb61..1ade89dd 100644 --- a/dist/edit-room-from-dialog.js +++ b/dist/edit-room-from-dialog.js @@ -393,7 +393,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/end-from-dialog.js b/dist/end-from-dialog.js index 70e3f4e9..df7ca549 100644 --- a/dist/end-from-dialog.js +++ b/dist/end-from-dialog.js @@ -268,7 +268,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/exit-from-dialog.js b/dist/exit-from-dialog.js index e35a4fb0..302cc3a8 100644 --- a/dist/exit-from-dialog.js +++ b/dist/exit-from-dialog.js @@ -297,7 +297,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/follower.js b/dist/follower.js index 9183fea4..e930ea37 100644 --- a/dist/follower.js +++ b/dist/follower.js @@ -283,7 +283,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/gravity.js b/dist/gravity.js index 71fa03f7..6d6a5e05 100644 --- a/dist/gravity.js +++ b/dist/gravity.js @@ -343,7 +343,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/javascript-dialog.js b/dist/javascript-dialog.js index 80f55617..df9c0288 100644 --- a/dist/javascript-dialog.js +++ b/dist/javascript-dialog.js @@ -255,7 +255,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/long-dialog.js b/dist/long-dialog.js index 14e4124f..d010fd9f 100644 --- a/dist/long-dialog.js +++ b/dist/long-dialog.js @@ -241,7 +241,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/online.js b/dist/online.js index cc9b6fa6..40f71f76 100644 --- a/dist/online.js +++ b/dist/online.js @@ -269,7 +269,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/palette-maps.js b/dist/palette-maps.js index b70f4139..3da8fa66 100644 --- a/dist/palette-maps.js +++ b/dist/palette-maps.js @@ -426,7 +426,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/paragraph-break.js b/dist/paragraph-break.js index 77c51e03..a0eb84a7 100644 --- a/dist/paragraph-break.js +++ b/dist/paragraph-break.js @@ -243,7 +243,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/save.js b/dist/save.js index 747609ff..62bdb504 100644 --- a/dist/save.js +++ b/dist/save.js @@ -269,7 +269,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/stopwatch.js b/dist/stopwatch.js index 25ebe959..e11694c9 100644 --- a/dist/stopwatch.js +++ b/dist/stopwatch.js @@ -292,7 +292,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/text-to-speech.js b/dist/text-to-speech.js index 1675ed73..61e28edb 100644 --- a/dist/text-to-speech.js +++ b/dist/text-to-speech.js @@ -266,7 +266,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/textbox-styler.js b/dist/textbox-styler.js index 352dda03..56d263c2 100644 --- a/dist/textbox-styler.js +++ b/dist/textbox-styler.js @@ -642,7 +642,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/dist/twine-bitsy-comms.js b/dist/twine-bitsy-comms.js index b9c807ba..0b7c58db 100644 --- a/dist/twine-bitsy-comms.js +++ b/dist/twine-bitsy-comms.js @@ -305,7 +305,7 @@ function _reinitEngine() { // interpreter. Unescape escaped parentheticals, too. function convertDialogTags(input, tag) { return input - .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".+?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { + .replace(new RegExp('\\\\?\\((' + tag + '(\\s+(".*?"|.+?))?)\\\\?\\)', 'g'), function (match, group) { if (match.substr(0, 1) === '\\') { return '(' + group + ')'; // Rewrite \(tag "..."|...\) to (tag "..."|...) } diff --git a/package-lock.json b/package-lock.json index d1eacb66..c0033845 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bitsy/hecks", - "version": "13.3.1", + "version": "13.3.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9b11f3d4..3b5192ec 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "hacks" ], "main": "index.mjs", - "version": "13.3.1", + "version": "13.3.2", "scripts": { "build": "rollup -c", "test": "jest --runInBand",