Merge pull request #4 from DorkmasterFlek/fix-tilde-replacement

Fix tilde card name replacement
This commit is contained in:
Josh birnholz
2023-02-10 00:55:18 -05:00
committed by GitHub

View File

@@ -2286,7 +2286,7 @@ function writeText(textObject, targetContext) {
rawText = params.get('copyright'); //so people using CC for custom card games without WotC's IP can customize their copyright info
if (rawText == 'none') { rawText = ''; }
}
if (rawText.toLowerCase().includes('{cardname}' || '~')) {
if (rawText.toLowerCase().includes('{cardname}') || rawText.toLowerCase().includes('~')) {
rawText = rawText.replace(/{cardname}|~/ig, getCardName());
}
if (document.querySelector('#info-artist').value == '') {