From 6282826daf4f4b8aeece3dfaeb8388c30bed3a51 Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Sat, 11 Mar 2023 12:25:55 +0100 Subject: [PATCH] add missing excludes for double entries (#203) * add missing excludes for double entries cockatrice will actually implicitly mark the second reverse-related tag on the same token as exclude, however we prefer to mark them explicitly, there are only two relations that we happened to have this wrong lazy bash: tag="reverse-related" relationrx="( *)<$tag([^>]*)>([^<]*)" exclude='exclude="exclude"' while IFS= read -r line; do if [[ $line =~ $relationrx ]]; then space=${BASH_REMATCH[1]} args=${BASH_REMATCH[2]} name=${BASH_REMATCH[3]} if [[ $last_name && $name == "$last_name" ]]; then if [[ ! $args =~ $exclude ]]; then echo "$space<$tag$args $exclude>$name" continue fi else last_name=$name fi else last_name="" fi echo "$line" done --- tokens.xml | 6 +++--- version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tokens.xml b/tokens.xml index 03dc7cd..76cd49b 100644 --- a/tokens.xml +++ b/tokens.xml @@ -9,7 +9,7 @@ Cockatrice/Magic-Token https://raw.githubusercontent.com/Cockatrice/Magic-Token/master/tokens.xml - 20230310b + 20230311