Skip to content

Commit

Permalink
Don't italicize Spree modes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbirnholz committed Mar 28, 2024
1 parent 01d11c5 commit 18e6fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/creator-23.js
Original file line number Diff line number Diff line change
Expand Up @@ -4687,7 +4687,7 @@ function changeCardIndex() {

var italicExemptions = ['Boast', 'Cycling', 'Visit', 'Prize', 'I', 'II', 'III', 'IV', 'I, II', 'II, III', 'III, IV', 'I, II, III', 'II, III, IV', 'I, II, III, IV', '• Khans', '• Dragons', '• Mirran', '• Phyrexian', 'Prototype', 'Companion', 'To solve', 'Solved'];
var rulesText = (cardToImport.oracle_text || '').replace(/(?:\((?:.*?)\)|[^"\n]+(?= — ))/g, function(a){
if (italicExemptions.includes(a)) {return a;}
if (italicExemptions.includes(a) || (cardToImport.keywords.indexOf('Spree') != -1 && a.startsWith('+'))) {return a;}
return '{i}' + a + '{/i}';
});
rulesText = curlyQuotes(rulesText).replace(/{Q}/g, '{untap}').replace(/{\u221E}/g, "{inf}").replace(//g, '• {indent}');
Expand Down

0 comments on commit 18e6fd7

Please sign in to comment.