@@ -42,12 +42,22 @@ fi
4242# Always remove the local cache to avoid any confusion
4343bat cache --clear
4444
45−# TODO: Remove this (and the reverse part below) when
46−# https://github.com/trishume/syntect/issues/222 has been fixed
47−JAVADOC_FILE="${ASSET_DIR}/syntaxes/01_Packages/Java/JavaDoc.sublime-syntax"
48−JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
49−patch "$JAVADOC_FILE" "$JAVADOC_PATCH"
45+# TODO:
46+# - Remove the JavaDoc patch once https://github.com/trishume/syntect/issues/222 has been fixed
47+# - Remove the C# patch once https://github.com/sublimehq/Packages/pull/2331 has been merged
48+
49+(
50+ cd "$ASSET_DIR"
51+ for patch in patches/*.patch; do
52+ patch --strip=0 < "$patch"
53+ done
54+)
5055
5156bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"
5257
53−patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"
58+(
59+ cd "$ASSET_DIR"
60+ for patch in patches/*.patch; do
61+ patch --strip=0 --reverse < "$patch"
62+ done
63+)