]> juplo.de Git - website/commit
Code-Listings mit einem von ChatGPT erzeugtem akw-Skript korrigiert
authorKai Moritz <kai@juplo.de>
Fri, 6 Feb 2026 18:34:06 +0000 (19:34 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 20 Feb 2026 13:50:41 +0000 (14:50 +0100)
commit7efff00b389da94c62576f32f1deba4b20b27db8
treef0ea0b3ea1c1a3792b4a54e7ed3902c577b0bde9
parent0443b48268658fb55a943fca749b452acc565591
Code-Listings mit einem von ChatGPT erzeugtem akw-Skript korrigiert

```bash
for i in `find content/blog/archive/ -type f`; do awk 'BEGIN {
    inblock = 0
}

{
    line = $0

    # START eines kaputten Codeblocks:
    # - beginnt (evtl. eingerückt) mit genau einem Backtick
    # - enthält danach KEINEN weiteren Backtick
    if (!inblock && match(line, /^[[:space:]]*`[^`]*$/)) {
        inblock = 1

        # führende Spaces + erstes Backtick entfernen
        sub(/^[[:space:]]*`/, "", line)

        print "```"
        print line
        next
    }

    # ENDE eines kaputten Codeblocks:
    # Zeile enthält nur ein Backtick (evtl. eingerückt)
    if (inblock && match(line, /^[[:space:]]*`[[:space:]]*$/)) {
        inblock = 0
        print "```"
        next
    }

    # Alles andere unverändert ausgeben
    print line
}
' $i | sponge $i; done
```
content/blog/archive/2013/hibernate4-maven-plugin-1-0-1-released.md
content/blog/archive/2013/hibernate4-maven-plugin-1-0-2-release.md
content/blog/archive/2014/hibernate4-maven-plugin-1-0-3-released.md
content/blog/archive/2014/hibernate4-maven-plugin-1-0-4-released.md
content/blog/archive/2015/hibernate4-maven-plugin-1-0-5-released.md
content/blog/archive/2015/hibernate4-maven-plugin-1-1-0-released.md
content/blog/archive/2020/deduplicating-partitioned-data-with-kafka-streams.md
content/blog/archive/2020/how-to-instantiatiate-multiple-beans-dinamically-in-spring-boot-based-on-configuration-properties.md
content/blog/archive/2020/testing-exception-handling-in-spring-mvc.md