diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 360b6fb..5449604 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -19,13 +19,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4.1.2 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4.2.1 with: java-version: '8' distribution: 'temurin' - - uses: gradle/gradle-build-action@v2.9.0 + - uses: gradle/gradle-build-action@v3.1.0 with: gradle-version: 8.7 name: Set up Gradle @@ -35,6 +35,6 @@ jobs: run: ./gradlew build - name: Upload a Build Artifact - uses: actions/upload-artifact@v3.1.2 + uses: actions/upload-artifact@v4.3.1 with: path: build/libs diff --git a/src/main/java/gkappa/wrapfix/mixin/MixinFontRenderer.java b/src/main/java/gkappa/wrapfix/mixin/MixinFontRenderer.java index 9efd529..3f236d3 100644 --- a/src/main/java/gkappa/wrapfix/mixin/MixinFontRenderer.java +++ b/src/main/java/gkappa/wrapfix/mixin/MixinFontRenderer.java @@ -114,13 +114,10 @@ private void wrapStringToWidthICU4J(String str, int wrapWidth, CallbackInfoRetur prevFormat = format.length(); lineWidth = getCharWidth(current); } else { - if (chars[icui - 1] == '§') { - if (isFormatSpecial(chars[icui]) || isFormatColor(chars[icui])) { - icui++; - } - } d = icui - fed; - list.add(line.substring(0, d + prevFormat)); + String first = line.substring(0, d + prevFormat); + if (first.endsWith("§")) WrapFix.logger.info(line); + list.add(first); temp = line.substring(d + prevFormat); fed = icui; line.delete(0, line.length()).append(formats[d]).append(temp);