Skip to content

Commit

Permalink
Merge pull request #725 from plural/remove-trace-tag
Browse files Browse the repository at this point in the history
Remove special handling for <trace> tags.
  • Loading branch information
plural authored Dec 26, 2022
2 parents 1b20e67 + e0806e8 commit 5ba20eb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions app/Resources/views/Default/syntax.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@
<div class="body row">
You can use the <code>x</code> syntax to match substrings of a card's ability text (as opposed to its flavor text):
<ul>
<li><code>x:"trace[x]"</code> – gets all cards with "trace[x]" in their text</li>
<li><code>x:run</code> – gets all cards with "run" in their text</li>
<li><code>x!"whenever the corp"</code> – gets all cards without "whenever the corp" in their text</li>
<li><code>x:"per turn"|"per run" x:2</code> – gets all with either "per turn" or "per run", and with the number 2 in their text</li>
Expand Down
3 changes: 0 additions & 3 deletions src/AppBundle/Service/CardsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -887,9 +887,6 @@ public function getCardInfo(Card $card, string $locale)

// If the card has text
if (strlen($cardinfo['text']) > 0) {
// replacing <trace>
$cardinfo['text'] = preg_replace('/<trace>([^<]+) ([X\d]+)<\/trace>/', '<strong>\1 [\2]</strong>–', $cardinfo['text']);

// replacing <errata>
$cardinfo['text'] = preg_replace('/<errata>(.+)<\/errata>/', '<em><span class="glyphicon glyphicon-alert"></span> \1</em>', $cardinfo['text']);

Expand Down
1 change: 0 additions & 1 deletion web/js/nrdb.format.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
text = text.replace(/\[weyland-consortium\]/g, '<span class="icon icon-weyland-consortium" aria-hidden="true"></span><span class="icon-fallback">weyland consortium</span>');
text = text.replace(/\[interrupt\]/g, '<span class="icon icon-interrupt" aria-hidden="true"></span><span class="icon-fallback">interrupt</span>');

text = text.replace(/<trace>([^<]+) ([X\d]+)<\/trace>/g, '<strong>$1 [$2]</strong>–');
text = text.replace(/<errata>(.+)<\/errata>/, '<em><span class="glyphicon glyphicon-alert"></span> $1</em>');

text = text.split("\n").join('</p><p>');
Expand Down

0 comments on commit 5ba20eb

Please sign in to comment.