codeannex 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codeannex-0.3.0 → codeannex-0.3.1}/PKG-INFO +1 -1
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/core/pdf_builder.py +12 -2
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex.egg-info/PKG-INFO +1 -1
- {codeannex-0.3.0 → codeannex-0.3.1}/pyproject.toml +1 -1
- {codeannex-0.3.0 → codeannex-0.3.1}/LICENSE +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/README.md +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/__init__.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/__main__.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/core/__init__.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/core/config.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/interface/__init__.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/interface/cli.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/io/__init__.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/io/file_utils.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/io/git_utils.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/renderer/__init__.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/renderer/fonts.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/renderer/highlight.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex/renderer/text_utils.py +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex.egg-info/SOURCES.txt +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex.egg-info/dependency_links.txt +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex.egg-info/entry_points.txt +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex.egg-info/requires.txt +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/codeannex.egg-info/top_level.txt +0 -0
- {codeannex-0.3.0 → codeannex-0.3.1}/setup.cfg +0 -0
|
@@ -214,10 +214,20 @@ class ModernAnnexPDF:
|
|
|
214
214
|
bookmark_parts, total_parts = f"{bookmark_key}__parts", self.summary_data.get(f"{bookmark_key}__parts", None)
|
|
215
215
|
header_suffix = self.config.file_part_format.replace("{current}", "1").replace("{total}", str(total_parts)) if total_parts else ""
|
|
216
216
|
self._draw_file_header(display_name, continuation=header_suffix)
|
|
217
|
-
try:
|
|
217
|
+
try:
|
|
218
|
+
ext = fpath.suffix.lower()
|
|
219
|
+
if ext == ".svg":
|
|
220
|
+
from pygments.lexers import XmlLexer
|
|
221
|
+
lexer = XmlLexer(stripnl=False)
|
|
222
|
+
elif fpath.name in [".gitignore", "LICENSE", "README"]:
|
|
223
|
+
lexer = TextLexer(stripnl=False)
|
|
224
|
+
else:
|
|
225
|
+
lexer = get_lexer_for_filename(str(fpath), stripnl=False)
|
|
218
226
|
except ClassNotFound:
|
|
219
|
-
if not self.is_simulation:
|
|
227
|
+
if not self.is_simulation:
|
|
228
|
+
print(f"ℹ️ Highlighting fallback: No lexer for '{fpath.name}'. Using plain text.")
|
|
220
229
|
lexer = TextLexer(stripnl=False)
|
|
230
|
+
|
|
221
231
|
self._render_tokens_to_lines(lexer.get_tokens(content or " "), display_name, bookmark_parts, total_parts)
|
|
222
232
|
self.y -= 4*mm
|
|
223
233
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codeannex"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.1"
|
|
8
8
|
description = "Generates a professional PDF source code annex with Smart Index, Images and Emoji support."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|