diff --git a/.github/workflows/scripts/python/changelog_markdown2lua.py b/.github/workflows/scripts/python/changelog_markdown2lua.py index 0658ad024c5..589a457a253 100755 --- a/.github/workflows/scripts/python/changelog_markdown2lua.py +++ b/.github/workflows/scripts/python/changelog_markdown2lua.py @@ -6,6 +6,7 @@ """ import mdformat +import re import yaml from argparse import ArgumentParser @@ -71,6 +72,7 @@ def markdown2lua(version: str, content: str) -> str: "wrap": MAX_LINE_LENGTH, }, ) + formatted_md = remove_liquid_tags(formatted_md) escaped_md = escape_special_symbols(formatted_md) lua_description = ",\n".join( @@ -97,6 +99,12 @@ def extract_yaml_front_matter(content: str) -> Tuple[str, str]: return '', content +def remove_liquid_tags(text: str) -> str: + """Removes all Liquid block tags like {% ... %} from the given text.""" + pattern = r"{%.*?%}\s*\n" + return re.sub(pattern, "", text) + + def escape_special_symbols(text: str) -> str: """Escapes special symbols in text for Lua compatibility.""" return text.replace("\\", "\\\\").replace('"', '\\"') diff --git a/changelog/snippets/balance.7139.md b/changelog/snippets/balance.7139.md index 7d78cda5abf..6741a62e945 100644 --- a/changelog/snippets/balance.7139.md +++ b/changelog/snippets/balance.7139.md @@ -1 +1 @@ -- (#7139) Give an on-impact water vision radius of 4 to Aeon depth charges and the Solace's cluster torpedoes to be consistent with their normal on-impact vision. +- Give an on-impact water vision radius of 4 to Aeon depth charges and the Solace's cluster torpedoes to be consistent with their normal on-impact vision (#7139). diff --git a/changelog/snippets/fix.7104.md b/changelog/snippets/fix.7104.md index e5a4d062f6a..19d028599be 100644 --- a/changelog/snippets/fix.7104.md +++ b/changelog/snippets/fix.7104.md @@ -1,3 +1 @@ -- (#7104) Fix computing the wrong area in the navigational mesh - -The new values may differ from the old values by +/- 15%. +- Fix computing the wrong area in the navigational mesh. The new values may differ from the old values by +/- 15% (#7104). diff --git a/changelog/snippets/fix.7127.md b/changelog/snippets/fix.7127.md index 9193cb4c6e5..af12fee6363 100644 --- a/changelog/snippets/fix.7127.md +++ b/changelog/snippets/fix.7127.md @@ -1 +1 @@ -- (#7127) Fix French locale for Selen's toggle incorrectly saying that it toggles the Selen's cloak, when it actually only toggles selection priority, and the cloak always activates when stationary. +- Fix French locale for Selen's toggle incorrectly saying that it toggles the Selen's cloak, when it actually only toggles selection priority, and the cloak always activates when stationary (#7127). diff --git a/changelog/snippets/fix.7129.md b/changelog/snippets/fix.7129.md index 9058e1eba0c..34ff2210640 100644 --- a/changelog/snippets/fix.7129.md +++ b/changelog/snippets/fix.7129.md @@ -1 +1 @@ -- (#7129) Fix typo in unlocalised version of the descriptive name of the UEF T3 Support Land Factory. +- Fix typo in unlocalised version of the descriptive name of the UEF T3 Support Land Factory (#7129). diff --git a/changelog/snippets/fix.7139.md b/changelog/snippets/fix.7139.md index 60e1ff28ea5..8cf581675b3 100644 --- a/changelog/snippets/fix.7139.md +++ b/changelog/snippets/fix.7139.md @@ -1 +1 @@ -- (#7139) Align the on-impact vision radius of the Lobo's (UEL0103) fragmentation shell, Aeon depth charges, and the Solace's cluster torpedoes to the engine's vision grid (5 -> 4). +- Align the on-impact vision radius of the Lobo's (UEL0103) fragmentation shell, Aeon depth charges, and the Solace's cluster torpedoes to the engine's vision grid (5 -> 4) (#7139). diff --git a/changelog/snippets/fix.7149.md b/changelog/snippets/fix.7149.md index 10438e6e85a..cbc1f42a00e 100644 --- a/changelog/snippets/fix.7149.md +++ b/changelog/snippets/fix.7149.md @@ -1 +1 @@ -- (#7149) Fix missing share condition default causing a score board UI loading error when the game was launched using the single player command line launch option. +- Fix missing share condition default causing a score board UI loading error when the game was launched using the single player command line launch option (#7149). diff --git a/changelog/snippets/graphics.7095.md b/changelog/snippets/graphics.7095.md new file mode 100644 index 00000000000..e9994c2e80b --- /dev/null +++ b/changelog/snippets/graphics.7095.md @@ -0,0 +1 @@ +- Fix the icon of the Aeon T1 power generator (#7095). \ No newline at end of file diff --git a/changelog/snippets/other.7036.md b/changelog/snippets/other.7036.md index 007bf7dd8e7..56b332dafa7 100644 --- a/changelog/snippets/other.7036.md +++ b/changelog/snippets/other.7036.md @@ -1 +1 @@ -- (#7036) Game repository: Update the setup instructions for the development environment. +- Game repository: Update the setup instructions for the development environment (#7036). diff --git a/changelog/snippets/other.7106.md b/changelog/snippets/other.7106.md index 9503b3ac475..1a2ea190e8d 100644 --- a/changelog/snippets/other.7106.md +++ b/changelog/snippets/other.7106.md @@ -1 +1 @@ -- (#7106) Generate BaseTemplate tables at import time instead of parsing them from lua source files. \ No newline at end of file +- Generate BaseTemplate tables at import time instead of parsing them from lua source files (#7106). \ No newline at end of file diff --git a/changelog/snippets/other.7137.md b/changelog/snippets/other.7137.md index d7adc134d44..020ae0a4f7e 100644 --- a/changelog/snippets/other.7137.md +++ b/changelog/snippets/other.7137.md @@ -1 +1 @@ -- (#7137) Add missing annotation for `CommonArmy` game option. +- Add missing annotation for `CommonArmy` game option (#7137). diff --git a/changelog/snippets/performance.6847.md b/changelog/snippets/performance.6847.md index d94e6370f46..eccbbf93c10 100644 --- a/changelog/snippets/performance.6847.md +++ b/changelog/snippets/performance.6847.md @@ -1 +1 @@ -- (#6847) Segment formations logic into different files and simplify category filters. +- Segment formations logic into different files and simplify category filters (#6847). diff --git a/changelog/snippets/sections/graphics.7095.md b/changelog/snippets/sections/graphics.7095.md deleted file mode 100644 index eef11c7bb0a..00000000000 --- a/changelog/snippets/sections/graphics.7095.md +++ /dev/null @@ -1 +0,0 @@ -- (#7095) Fix the icon of the Aeon T1 power generator. \ No newline at end of file diff --git a/docs/_plugins/balance_change.rb b/docs/_plugins/balance_change.rb new file mode 100644 index 00000000000..d7bac3ab7ab --- /dev/null +++ b/docs/_plugins/balance_change.rb @@ -0,0 +1,24 @@ +Jekyll::Hooks.register [:pages, :documents], :post_render do |doc| + + apply = + # Everything in _posts + (doc.respond_to?(:collection) && doc.collection.label == "posts") || + # Generated changelogs + doc.respond_to?(:path) && File.basename(doc.path) == "fafbeta.md" || + doc.respond_to?(:path) && File.basename(doc.path) == "fafdevelop.md" + + next unless apply + + # Use https://regex101.com/ to debug regex. + doc.output.gsub!( + /
  • ([^<]+?)