Skip to content

Commit 94a2b8d

Browse files
authored
Merge pull request #545 from funstory-ai/dev
Refactor argument parsing in PDF document creator
2 parents 92696f4 + a5d00ed commit 94a2b8d

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

babeldoc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.5.21"
1+
__version__ = "0.5.22"

babeldoc/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import threading
77
from pathlib import Path
88

9-
__version__ = "0.5.21"
9+
__version__ = "0.5.22"
1010

1111
CACHE_FOLDER = Path.home() / ".cache" / "babeldoc"
1212

babeldoc/format/pdf/document_il/frontend/il_creater.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,9 @@ def remove_latest_passthrough_per_char_instruction(self):
468468
def parse_arg(self, arg: str):
469469
if isinstance(arg, PSLiteral):
470470
return f"/{arg.name}"
471-
if not isinstance(arg, str):
471+
elif isinstance(arg, float):
472+
return f"{arg:f}"
473+
elif not isinstance(arg, str):
472474
return str(arg)
473475
return arg
474476

babeldoc/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from babeldoc.translator.translator import set_translate_rate_limiter
2727

2828
logger = logging.getLogger(__name__)
29-
__version__ = "0.5.21"
29+
__version__ = "0.5.22"
3030

3131

3232
def create_parser():

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "BabelDOC"
3-
version = "0.5.21"
3+
version = "0.5.22"
44
description = "Yet Another Document Translator"
55
license = "AGPL-3.0"
66
readme = "README.md"
@@ -162,7 +162,7 @@ pythonpath = [".", "src"]
162162
testpaths = ["tests"]
163163

164164
[bumpver]
165-
current_version = "0.5.21"
165+
current_version = "0.5.22"
166166
version_pattern = "MAJOR.MINOR.PATCH[.PYTAGNUM]"
167167

168168
[bumpver.file_patterns]

0 commit comments

Comments
 (0)