Repository navigation
v2.2.0
🚀 Release v2.2.0
👍 Added
max_threadsinput inaction.ymlto 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_fileto strip stray spaces inside**bold**and__italic__markers after placeholder restoration.
🛠 Changed
-
Action metadata (
action.yml)- Switched fully to
inputs/withsyntax. - Added
max_threads(default: 5) alongside existingfiles,langs,debugandmax_line_length.
- Switched fully to
-
Dockerfile
- Pinned to
python:3.9.16‑slim. - Runs under a non‑root
appuser, copies the entirecore/tree, and invokescore/main.py.
- Pinned to
-
core/main.py- Now parses exactly five
sys.argvparameters (files,langs,debug,max_threads,max_line_length). - Dynamically adjusts logging level when
debug: 'true'.
- Now parses exactly five
-
Concurrency model
- Switched translation calls to use an
asyncio.Semaphore(max_threads)instead of default fully‐parallel gathers, preventing API‑quota bursts.
- Switched translation calls to use an
-
Placeholder handling (
processor.py)- Always store “original” text as a string (not tuple) to avoid the
TypeErrorin_restore_placeholders. - Introduced a new
_MD_BLOCK_NOTEplaceholder type for skipped call‑outs.
- Always store “original” text as a string (not tuple) to avoid the
🐛 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_processesfork.