Skip to content

v2.2.0

Choose a tag to compare

@mrf0rtuna4 mrf0rtuna4 released this 20 May 09:19
· 45 commits to master since this release

🚀 Release v2.2.0

👍 Added

  • max_threads input in action.yml to control concurrent translation calls.
  • Call‑out block exclusion: lines beginning with > [!…] (e.g. > [!WARNING] …) are now automatically skipped (preserved verbatim) rather than run through the translator.
  • Regex‐cleanup step in Processor.build_file to strip stray spaces inside **bold** and __italic__ markers after placeholder restoration.

🛠 Changed

  • Action metadata (action.yml)

    • Switched fully to inputs/with syntax.
    • Added max_threads (default: 5) alongside existing files, langs, debug and max_line_length.
  • Dockerfile

    • Pinned to python:3.9.16‑slim.
    • Runs under a non‑root appuser, copies the entire core/ tree, and invokes core/main.py.
  • core/main.py

    • Now parses exactly five sys.argv parameters (files, langs, debug, max_threads, max_line_length).
    • Dynamically adjusts logging level when debug: 'true'.
  • Concurrency model

    • Switched translation calls to use an asyncio.Semaphore(max_threads) instead of default fully‐parallel gathers, preventing API‑quota bursts.
  • Placeholder handling (processor.py)

    • Always store “original” text as a string (not tuple) to avoid the TypeError in _restore_placeholders.
    • Introduced a new _MD_BLOCK_NOTE placeholder type for skipped call‑outs.

🐛 Fixed

  • Markdown‐element spacing: fixed bug where **test** could become ** test ** after placeholder round‑trip.
  • Placeholder restore: corrected replacement logic so every placeholder is properly re‑inserted as its original string.

🚫 Removed

  • CPU‐process pool sketch from v2.2.0 pre‑releases—decided to preserve the existing escape/placeholder stability rather than introduce a max_processes fork.