markdown_convert 1.2.30__py3-none-any.whl → 1.2.32__py3-none-any.whl

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.
@@ -1,11 +1,13 @@
1
1
  :root {
2
2
  /* -- Standard margins */
3
- --top-margin: 0.5em;
3
+ --top-margin: 0.75em;
4
4
  --bottom-margin: 0.5em;
5
5
  --left-margin: 1.5em;
6
6
 
7
7
  /* -- Small margins */
8
8
  --left-margin-small: 1em;
9
+ --top-margin-small: 0.25em;
10
+ --bottom-margin-small: 0.15em;
9
11
 
10
12
  /* -- Big margins */
11
13
  --left-margin-big: 2em;
@@ -49,23 +51,27 @@ p {
49
51
  }
50
52
 
51
53
  h1 {
52
- font-size: 2.4rem;
54
+ font-size: 2.2rem;
55
+ border-bottom: 0.5px solid #999;
56
+ padding-bottom: var(--bottom-margin-small);
53
57
  }
54
58
 
55
59
  h2 {
56
- font-size: 2rem;
60
+ font-size: 1.8rem;
61
+ border-bottom: 0.5px solid #999;
62
+ padding-bottom: var(--bottom-margin-small);
57
63
  }
58
64
 
59
65
  h3 {
60
- font-size: 1.6rem;
66
+ font-size: 1.4rem;
61
67
  }
62
68
 
63
69
  h4 {
64
- font-size: 1.4rem;
70
+ font-size: 1.2rem;
65
71
  }
66
72
 
67
73
  h5 {
68
- font-size: 1.2rem;
74
+ font-size: 1rem;
69
75
  }
70
76
 
71
77
  p {
@@ -98,7 +104,7 @@ ul ul {
98
104
  }
99
105
 
100
106
  li {
101
- margin-top: var(--top-margin);
107
+ margin-top: var(--top-margin-small);
102
108
  }
103
109
 
104
110
  /* Code blocks */
@@ -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
- return pattern.sub(wrap_section, html)
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
- html = html.replace(unchecked, unchecked_html)
93
- html = html.replace(checked, checked_html)
94
- return html
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: markdown_convert
3
- Version: 1.2.30
3
+ Version: 1.2.32
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>
@@ -1,16 +1,16 @@
1
1
  markdown_convert/__init__.py,sha256=ysW3pXsDGGK4PzZHcIBTpfVW58IkDUwHffDkf_GM6UU,303
2
2
  markdown_convert/__main__.py,sha256=hO7AO0GnzPMPNqls8r5aF2C-7l9aFHDf1m8mXSy1GBE,2809
3
3
  markdown_convert/code.css,sha256=Wt4FqFqJcpT-jwY3GN-o4ZRCCXU8DQj-9lqKdGiuoyw,4935
4
- markdown_convert/default.css,sha256=sTIJmfRWOe8SVwlhzw9CSXD44TUtgfjKCHJjf6u2O8U,2877
4
+ markdown_convert/default.css,sha256=lSblm_9d2dA1kCTspeGlJMtt3-SeYX1k2YzsVXbhRw4,3109
5
5
  markdown_convert/modules/__init__.py,sha256=PFPgiQhMXgyfjD8BkfLC_X8AR1jz-dCxfif2qmNofJs,65
6
6
  markdown_convert/modules/constants.py,sha256=_h6N0fhG9K1hQPmp3eYu53TfQnAPe7RtmMj-2FCD7VU,495
7
7
  markdown_convert/modules/convert.py,sha256=R1xIKW6UVGP7a6VK5C6qLK278wBlHZV9X6Y9q73mz_k,9843
8
8
  markdown_convert/modules/resources.py,sha256=tnW8JmCrJNBRbzOcaOVG6GX5jPC8Kzj3dA7gX0B935A,2488
9
- markdown_convert/modules/transform.py,sha256=_xARTGDj7q3qqrLs8cyUC_TYcAaJEtv3KDLDUAs0rVc,2417
9
+ markdown_convert/modules/transform.py,sha256=Vm6FeYT1n0-ytesd7vVQfSXitSNLt5cegApk4l6n5SQ,3131
10
10
  markdown_convert/modules/utils.py,sha256=NX0WegM8e8MPKNNmweTujAWO8ZghdB8LSGDx20K2E44,655
11
11
  markdown_convert/modules/validate.py,sha256=XV_k7cHeifEKDaltF26tCmabs2-Me5msP3enI_eVwfA,1517
12
- markdown_convert-1.2.30.dist-info/METADATA,sha256=lYxxOYsszSYghE4TDxPKBizB4aO4z603YY1KdPDzs0Y,3895
13
- markdown_convert-1.2.30.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
- markdown_convert-1.2.30.dist-info/entry_points.txt,sha256=RCmzC7C0sX-SpzIP2Cr34rhg3lMd7BRx-exaZPfK8bU,68
15
- markdown_convert-1.2.30.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
16
- markdown_convert-1.2.30.dist-info/RECORD,,
12
+ markdown_convert-1.2.32.dist-info/METADATA,sha256=S8EjU4dfpsRzj2dsRM2JfhxWmBdNFsykhbs-tfd0QhM,3895
13
+ markdown_convert-1.2.32.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
+ markdown_convert-1.2.32.dist-info/entry_points.txt,sha256=RCmzC7C0sX-SpzIP2Cr34rhg3lMd7BRx-exaZPfK8bU,68
15
+ markdown_convert-1.2.32.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
16
+ markdown_convert-1.2.32.dist-info/RECORD,,