forked from GithubMirrors/cardconjurer
Fix tilde card name replacement
The tilde replacement for card name doesn't work if the "{cardname}" tag isn't present because the if condition is incorrect. This fixes the condition to check for either one.
This commit is contained in:
@@ -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
|
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 == 'none') { rawText = ''; }
|
||||||
}
|
}
|
||||||
if (rawText.toLowerCase().includes('{cardname}' || '~')) {
|
if (rawText.toLowerCase().includes('{cardname}') || rawText.toLowerCase().includes('~')) {
|
||||||
rawText = rawText.replace(/{cardname}|~/ig, getCardName());
|
rawText = rawText.replace(/{cardname}|~/ig, getCardName());
|
||||||
}
|
}
|
||||||
if (document.querySelector('#info-artist').value == '') {
|
if (document.querySelector('#info-artist').value == '') {
|
||||||
|
Reference in New Issue
Block a user