markdown_convert 1.2.31__tar.gz → 1.2.33__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.
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/PKG-INFO +1 -1
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/default.css +12 -3
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/modules/transform.py +17 -4
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/pyproject.toml +1 -1
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/.gitignore +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/LICENSE +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/README.md +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/__init__.py +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/__main__.py +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/code.css +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/modules/__init__.py +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/modules/constants.py +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/modules/convert.py +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/modules/resources.py +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/modules/utils.py +0 -0
- {markdown_convert-1.2.31 → markdown_convert-1.2.33}/markdown_convert/modules/validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: markdown_convert
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.33
|
|
4
4
|
Summary: Convert Markdown files to PDF from your command line.
|
|
5
5
|
Project-URL: homepage, https://github.com/Julynx/markdown_convert
|
|
6
6
|
Author-email: Julio Cabria <juliocabria@tutanota.com>
|
|
@@ -170,6 +170,7 @@ table {
|
|
|
170
170
|
border-collapse: collapse;
|
|
171
171
|
margin-top: var(--top-margin);
|
|
172
172
|
text-align: left;
|
|
173
|
+
width: 100%;
|
|
173
174
|
table-layout: auto;
|
|
174
175
|
}
|
|
175
176
|
|
|
@@ -185,11 +186,19 @@ th,
|
|
|
185
186
|
td {
|
|
186
187
|
padding: 0.5em 0.75em;
|
|
187
188
|
border: 1px solid #ccc;
|
|
188
|
-
|
|
189
|
+
overflow-wrap: break-word;
|
|
190
|
+
vertical-align: top;
|
|
189
191
|
}
|
|
190
192
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
th {
|
|
194
|
+
white-space: normal;
|
|
195
|
+
word-break: keep-all;
|
|
196
|
+
hyphens: auto;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
td {
|
|
200
|
+
white-space: normal;
|
|
201
|
+
word-break: break-word;
|
|
193
202
|
}
|
|
194
203
|
|
|
195
204
|
/* Page breaks */
|
|
@@ -44,7 +44,14 @@ def create_sections(html):
|
|
|
44
44
|
def wrap_section(match):
|
|
45
45
|
return f"<section>\n{match.group(1)}\n{match.group(2)}\n</section>\n"
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
# Split by code blocks to avoid processing text inside them
|
|
48
|
+
parts = re.split(r"(<code>.*?</code>)", html, flags=re.DOTALL)
|
|
49
|
+
for part_index, _part in enumerate(parts):
|
|
50
|
+
# Only process parts that are NOT code blocks
|
|
51
|
+
if not parts[part_index].startswith("<code>"):
|
|
52
|
+
parts[part_index] = pattern.sub(wrap_section, parts[part_index])
|
|
53
|
+
|
|
54
|
+
return "".join(parts)
|
|
48
55
|
|
|
49
56
|
|
|
50
57
|
def render_mermaid_diagrams(html, *, nonce):
|
|
@@ -89,6 +96,12 @@ def render_checkboxes(html):
|
|
|
89
96
|
unchecked_html = "<input type='checkbox'>"
|
|
90
97
|
checked_html = "<input type='checkbox' checked>"
|
|
91
98
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
# Split by code blocks to avoid processing text inside them
|
|
100
|
+
parts = re.split(r"(<code>.*?</code>)", html, flags=re.DOTALL)
|
|
101
|
+
for part_index, _part in enumerate(parts):
|
|
102
|
+
# Only process parts that are NOT code blocks
|
|
103
|
+
if not parts[part_index].startswith("<code>"):
|
|
104
|
+
parts[part_index] = parts[part_index].replace(unchecked, unchecked_html)
|
|
105
|
+
parts[part_index] = parts[part_index].replace(checked, checked_html)
|
|
106
|
+
|
|
107
|
+
return "".join(parts)
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "markdown_convert"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.33"
|
|
8
8
|
description = "Convert Markdown files to PDF from your command line."
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Julio Cabria", email = "juliocabria@tutanota.com" },
|
|
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
|