Skip to content

Commit

Permalink
Fix old frame vanilla flavor text positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbirnholz committed Jun 2, 2024
1 parent 65720d4 commit 5b905df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/creator-23.js
Original file line number Diff line number Diff line change
Expand Up @@ -3433,10 +3433,10 @@ function writeText(textObject, targetContext) {
}
rawText = rawText.replace(/ - /g, ' — ');
var splitText = rawText.replace(/\n/g, '{line}').replace(/{-}/g, '\u2014').replace(/{divider}/g, '{/indent}{lns}{bar}{lns}{fixtextalign}');
if (rawText.trim().startsWith('{flavor}')) {
splitText = splitText.replace(/{flavor}/g, '{i}').replace(/{oldflavor}/g, '{/indent}{lns}{lns}{up30}{i}');
if (rawText.trim().startsWith('{flavor}') || rawText.trim().startsWith('{oldflavor}')) {
splitText = splitText.replace(/{flavor}/g, '{i}').replace(/{oldflavor}/g, '{i}');
} else {
splitText = splitText.replace(/{flavor}/g, '{/indent}{lns}{bar}{lns}{fixtextalign}{i}').replace(/{oldflavor}/g, '{i}');
splitText = splitText.replace(/{flavor}/g, '{/indent}{lns}{bar}{lns}{fixtextalign}{i}').replace(/{oldflavor}/g, '{/indent}{lns}{lns}{up30}{i}');
}
splitText = splitText.replace(/{/g, splitString + '{').replace(/}/g, '}' + splitString).replace(/ /g, splitString + ' ' + splitString).split(splitString);

Expand Down

0 comments on commit 5b905df

Please sign in to comment.