From 00beb1abd20c79702d4fe729aa8419f9addb7e0a Mon Sep 17 00:00:00 2001 From: RojjaCebolla <62170514+RojjaCebolla@users.noreply.github.com> Date: Tue, 22 Nov 2022 00:29:07 -0600 Subject: [PATCH 1/3] Use tilde as shorthand for {cardname} Typing out curly braces is tedious, and unfriendly to arthritis/RSI. MSE users may expect tilde to "just work" in the same way it does on MSE. Even scryfall queries can be made using the traditional tilde: https://scryfall.com/docs/syntax --- js/creator-23.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/creator-23.js b/js/creator-23.js index ed8a3610..17f5be21 100644 --- a/js/creator-23.js +++ b/js/creator-23.js @@ -891,7 +891,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 = rawText.replace(/{cardname}/ig, getCardName()); } if (document.querySelector('#info-artist').value == '') { From e89aeab572d28ebf093ffcd9194fd105f3b45b4c Mon Sep 17 00:00:00 2001 From: RojjaCebolla <62170514+RojjaCebolla@users.noreply.github.com> Date: Tue, 22 Nov 2022 00:33:50 -0600 Subject: [PATCH 2/3] add cardname-tilde to documentation --- creator/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/creator/index.html b/creator/index.html index 54b8a0a0..3e608a53 100644 --- a/creator/index.html +++ b/creator/index.html @@ -217,7 +217,7 @@
Text Codes:
Code
Result
-
{cardname}
Inserts the name of the card
+
{cardname}
Inserts the name of the card (or use a tilde: ~)
{-}
Inserts an em-dash
{i}
Italicizes text
{/i}
Removes italicization
@@ -808,4 +808,4 @@
- \ No newline at end of file + From bfe155b7bff1f6f2742d8e2a910f32fad2a181a2 Mon Sep 17 00:00:00 2001 From: Chris McGuire <92750180+MrTeferi@users.noreply.github.com> Date: Wed, 7 Dec 2022 17:55:13 -0600 Subject: [PATCH 3/3] Update js/creator-23.js Co-authored-by: ForgeThrall <14297794+ForgeThrall@users.noreply.github.com> --- js/creator-23.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/creator-23.js b/js/creator-23.js index 17f5be21..6a451860 100644 --- a/js/creator-23.js +++ b/js/creator-23.js @@ -892,7 +892,7 @@ function writeText(textObject, targetContext) { if (rawText == 'none') { rawText = ''; } } if (rawText.toLowerCase().includes('{cardname}' || '~')) { - rawText = rawText.replace(/{cardname}/ig, getCardName()); + rawText = rawText.replace(/{cardname}|~/ig, getCardName()); } if (document.querySelector('#info-artist').value == '') { rawText = rawText.replace('\uFFEE{elemidinfo-artist}', '');