mirror of
https://github.com/Cockatrice/Magic-Token.git
synced 2026-04-21 00:57:28 -05:00
* 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([^>]*)>([^<]*)</$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</$tag>"
continue
fi
else
last_name=$name
fi
else
last_name=""
fi
echo "$line"
done <tokens.xml | sponge tokens.xml
* update version to 20230311
---------
Co-authored-by: github-actions <github-actions@github.com>
2 lines
9 B
Plaintext
2 lines
9 B
Plaintext
20230311
|