md2linkedin 0.2.0__tar.gz → 0.2.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: md2linkedin
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Convert Markdown to LinkedIn-friendly Unicode text
5
5
  Keywords: markdown,linkedin,unicode,formatting,conversion
6
6
  Author: Indrajeet Patil
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
21
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
22
  Classifier: Topic :: Text Processing :: Markup
23
23
  Classifier: Topic :: Utilities
24
- Requires-Dist: click>=8.3.2
24
+ Requires-Dist: click>=8.3.3
25
25
  Requires-Python: >=3.10
26
26
  Project-URL: Homepage, https://github.com/IndrajeetPatil/md2linkedin
27
27
  Project-URL: Documentation, https://www.indrapatil.com/md2linkedin/
@@ -30,21 +30,21 @@ Project-URL: Issues, https://github.com/IndrajeetPatil/md2linkedin/issues
30
30
  Project-URL: Changelog, https://github.com/IndrajeetPatil/md2linkedin/blob/main/CHANGELOG.md
31
31
  Description-Content-Type: text/markdown
32
32
 
33
-
34
-
35
-
36
33
  # md2linkedin <img src="https://raw.githubusercontent.com/IndrajeetPatil/md2linkedin/main/docs/assets/logo.png" align="right" width="240" />
37
34
 
35
+
38
36
  [![PyPI
39
37
  version](https://img.shields.io/pypi/v/md2linkedin.png)](https://pypi.org/project/md2linkedin/)
40
- ![Python versions](https://img.shields.io/pypi/pyversions/md2linkedin.png)
38
+ ![Python
39
+ versions](https://img.shields.io/pypi/pyversions/md2linkedin.png)
41
40
  [![PyPI
42
41
  Downloads](https://img.shields.io/pypi/dm/md2linkedin.png)](https://pypistats.org/packages/md2linkedin)
43
42
 
44
- `md2linkedin` converts Markdown text to LinkedIn-compatible plain text by
45
- replacing bold, italic, and bold-italic markers with Unicode Mathematical
46
- Sans-Serif characters. This preserves visual formatting when pasting into
47
- platforms like LinkedIn that do not support Markdown natively.
43
+ `md2linkedin` converts Markdown text to LinkedIn-compatible plain text
44
+ by replacing bold, italic, and bold-italic markers with Unicode
45
+ Mathematical Sans-Serif characters. This preserves visual formatting
46
+ when pasting into platforms like LinkedIn that do not support Markdown
47
+ natively.
48
48
 
49
49
  ## Installation
50
50
 
@@ -78,19 +78,17 @@ Check it out and let me know what you think.
78
78
  print(convert(md))
79
79
  ```
80
80
 
81
-
82
81
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
82
  𝗘𝗫𝗖𝗜𝗧𝗜𝗡𝗚 𝗡𝗘𝗪𝗦
84
83
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85
-
86
- 𝘐'𝘮 𝘵𝘩𝘳𝘪𝘭𝘭𝘦𝘥 𝘵𝘰 𝘴𝘩𝘢𝘳𝘦 𝘵𝘩𝘢𝘵 𝘄𝗲 𝗷𝘂𝘀𝘁 𝗹𝗮𝘂𝗻𝗰𝗵𝗲𝗱 a new product!
87
-
84
+
85
+ I'm thrilled to share that 𝘄𝗲 𝗷𝘂𝘀𝘁 𝗹𝗮𝘂𝗻𝗰𝗵𝗲𝗱 a new product!
86
+
88
87
  Key highlights:
89
-
90
- • 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲: 𝘴𝘱𝘦𝘦𝘥 is faster than the previous version
88
+ • 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲: 3𝘹 𝘧𝘢𝘴𝘵𝘦𝘳 than the previous version
91
89
  • 𝗥𝗲𝗹𝗶𝗮𝗯𝗶𝗹𝗶𝘁𝘆: 𝙯𝙚𝙧𝙤 𝙙𝙤𝙬𝙣𝙩𝙞𝙢𝙚 deployments
92
90
  • 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿 𝗨𝗫: clean, intuitive API
93
-
91
+
94
92
  Check it out and let me know what you think.
95
93
 
96
94
  ### CLI
@@ -116,15 +114,16 @@ md2linkedin post.md --no-monospace-code
116
114
 
117
115
  - **Bold**: `**text**` or `__text__` → Unicode Sans-Serif Bold (𝗯𝗼𝗹𝗱)
118
116
  - **Italic**: `*text*` or `_text_` → Unicode Sans-Serif Italic (𝘪𝘵𝘢𝘭𝘪𝘤)
119
- - **Bold-italic**: `***text***` or `___text___` → Unicode Sans-Serif Bold
120
- Italic (𝙗𝙤𝙡𝙙-𝙞𝙩𝙖𝙡𝙞𝙘)
121
- - **Headers**: `#`/`##`/etc. styled with bold Unicode; H1 gets a `━` border
122
- - **Code spans**: backticks stripped, content rendered in Unicode Monospace
123
- (𝚌𝚘𝚍𝚎) by default; `--no-monospace-code` keeps plain text
124
- - **Fenced code blocks**: fences stripped and content rendered in Unicode
125
- Monospace by default; `--no-monospace-code` preserves verbatim
126
- - **Links**: stripped to display text by default; `--preserve-links` retains
127
- URLs
117
+ - **Bold-italic**: `***text***` or `___text___` → Unicode Sans-Serif
118
+ Bold Italic (𝙗𝙤𝙡𝙙-𝙞𝙩𝙖𝙡𝙞𝙘)
119
+ - **Headers**: `#`/`##`/etc. styled with bold Unicode; H1 gets a `━`
120
+ border
121
+ - **Code spans**: backticks stripped, content rendered in Unicode
122
+ Monospace (𝚌𝚘𝚍𝚎) by default; `--no-monospace-code` keeps plain text
123
+ - **Fenced code blocks**: fences stripped and content rendered in
124
+ Unicode Monospace by default; `--no-monospace-code` preserves verbatim
125
+ - **Links**: stripped to display text by default; `--preserve-links`
126
+ retains URLs
128
127
  - **Images**: replaced by alt text
129
128
  - **Bullet lists**: `-`/`*`/`+` → `•`; nested items → `‣`
130
129
  - **Blockquotes**: leading `>` stripped
@@ -132,7 +131,29 @@ md2linkedin post.md --no-monospace-code
132
131
  - **HTML entities**: decoded (`&amp;` → `&`, etc.)
133
132
  - **Backslash escapes**: resolved (`\*` → `*`)
134
133
  - **Windows line endings**: normalised automatically
135
- - **Emojis & non-ASCII**: pass through unchanged — no accidental corruption
134
+ - **Emojis & non-ASCII**: pass through unchanged — no accidental
135
+ corruption
136
+
137
+ ## Limitations
138
+
139
+ Converting Markdown to LinkedIn-friendly text relies on Unicode
140
+ Mathematical Alphanumeric Symbols to simulate styling. This approach has
141
+ notable limitations:
142
+
143
+ - **Code Blocks**: Monospace Unicode characters do not enforce true
144
+ fixed-width alignment on proportional fonts (like LinkedIn’s default
145
+ font). As a result, indentation and column alignment in code blocks
146
+ will often break visually.
147
+ - **Tables**: Markdown tables are not converted — they pass through as
148
+ raw pipe syntax (`| col | col |`), which LinkedIn does not render,
149
+ producing unreadable output.
150
+ - **Accessibility**: Screen readers often read Unicode mathematical
151
+ characters aloud individually (e.g., “mathematical sans-serif bold b”)
152
+ instead of as complete words, making the content difficult for
153
+ visually impaired users to understand.
154
+ - **Searchability**: Text styled with these Unicode characters may not
155
+ be indexed properly by LinkedIn’s search algorithm, meaning people
156
+ searching for your keywords might not find your post.
136
157
 
137
158
  For more examples, check out the package documentation at:
138
159
  <https://www.indrapatil.com/md2linkedin/>
@@ -1,18 +1,18 @@
1
-
2
-
3
-
4
1
  # md2linkedin <img src="https://raw.githubusercontent.com/IndrajeetPatil/md2linkedin/main/docs/assets/logo.png" align="right" width="240" />
5
2
 
3
+
6
4
  [![PyPI
7
5
  version](https://img.shields.io/pypi/v/md2linkedin.png)](https://pypi.org/project/md2linkedin/)
8
- ![Python versions](https://img.shields.io/pypi/pyversions/md2linkedin.png)
6
+ ![Python
7
+ versions](https://img.shields.io/pypi/pyversions/md2linkedin.png)
9
8
  [![PyPI
10
9
  Downloads](https://img.shields.io/pypi/dm/md2linkedin.png)](https://pypistats.org/packages/md2linkedin)
11
10
 
12
- `md2linkedin` converts Markdown text to LinkedIn-compatible plain text by
13
- replacing bold, italic, and bold-italic markers with Unicode Mathematical
14
- Sans-Serif characters. This preserves visual formatting when pasting into
15
- platforms like LinkedIn that do not support Markdown natively.
11
+ `md2linkedin` converts Markdown text to LinkedIn-compatible plain text
12
+ by replacing bold, italic, and bold-italic markers with Unicode
13
+ Mathematical Sans-Serif characters. This preserves visual formatting
14
+ when pasting into platforms like LinkedIn that do not support Markdown
15
+ natively.
16
16
 
17
17
  ## Installation
18
18
 
@@ -46,19 +46,17 @@ Check it out and let me know what you think.
46
46
  print(convert(md))
47
47
  ```
48
48
 
49
-
50
49
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
51
50
  𝗘𝗫𝗖𝗜𝗧𝗜𝗡𝗚 𝗡𝗘𝗪𝗦
52
51
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
53
-
54
- 𝘐'𝘮 𝘵𝘩𝘳𝘪𝘭𝘭𝘦𝘥 𝘵𝘰 𝘴𝘩𝘢𝘳𝘦 𝘵𝘩𝘢𝘵 𝘄𝗲 𝗷𝘂𝘀𝘁 𝗹𝗮𝘂𝗻𝗰𝗵𝗲𝗱 a new product!
55
-
52
+
53
+ I'm thrilled to share that 𝘄𝗲 𝗷𝘂𝘀𝘁 𝗹𝗮𝘂𝗻𝗰𝗵𝗲𝗱 a new product!
54
+
56
55
  Key highlights:
57
-
58
- • 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲: 𝘴𝘱𝘦𝘦𝘥 is faster than the previous version
56
+ • 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲: 3𝘹 𝘧𝘢𝘴𝘵𝘦𝘳 than the previous version
59
57
  • 𝗥𝗲𝗹𝗶𝗮𝗯𝗶𝗹𝗶𝘁𝘆: 𝙯𝙚𝙧𝙤 𝙙𝙤𝙬𝙣𝙩𝙞𝙢𝙚 deployments
60
58
  • 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗲𝗿 𝗨𝗫: clean, intuitive API
61
-
59
+
62
60
  Check it out and let me know what you think.
63
61
 
64
62
  ### CLI
@@ -84,15 +82,16 @@ md2linkedin post.md --no-monospace-code
84
82
 
85
83
  - **Bold**: `**text**` or `__text__` → Unicode Sans-Serif Bold (𝗯𝗼𝗹𝗱)
86
84
  - **Italic**: `*text*` or `_text_` → Unicode Sans-Serif Italic (𝘪𝘵𝘢𝘭𝘪𝘤)
87
- - **Bold-italic**: `***text***` or `___text___` → Unicode Sans-Serif Bold
88
- Italic (𝙗𝙤𝙡𝙙-𝙞𝙩𝙖𝙡𝙞𝙘)
89
- - **Headers**: `#`/`##`/etc. styled with bold Unicode; H1 gets a `━` border
90
- - **Code spans**: backticks stripped, content rendered in Unicode Monospace
91
- (𝚌𝚘𝚍𝚎) by default; `--no-monospace-code` keeps plain text
92
- - **Fenced code blocks**: fences stripped and content rendered in Unicode
93
- Monospace by default; `--no-monospace-code` preserves verbatim
94
- - **Links**: stripped to display text by default; `--preserve-links` retains
95
- URLs
85
+ - **Bold-italic**: `***text***` or `___text___` → Unicode Sans-Serif
86
+ Bold Italic (𝙗𝙤𝙡𝙙-𝙞𝙩𝙖𝙡𝙞𝙘)
87
+ - **Headers**: `#`/`##`/etc. styled with bold Unicode; H1 gets a `━`
88
+ border
89
+ - **Code spans**: backticks stripped, content rendered in Unicode
90
+ Monospace (𝚌𝚘𝚍𝚎) by default; `--no-monospace-code` keeps plain text
91
+ - **Fenced code blocks**: fences stripped and content rendered in
92
+ Unicode Monospace by default; `--no-monospace-code` preserves verbatim
93
+ - **Links**: stripped to display text by default; `--preserve-links`
94
+ retains URLs
96
95
  - **Images**: replaced by alt text
97
96
  - **Bullet lists**: `-`/`*`/`+` → `•`; nested items → `‣`
98
97
  - **Blockquotes**: leading `>` stripped
@@ -100,7 +99,29 @@ md2linkedin post.md --no-monospace-code
100
99
  - **HTML entities**: decoded (`&amp;` → `&`, etc.)
101
100
  - **Backslash escapes**: resolved (`\*` → `*`)
102
101
  - **Windows line endings**: normalised automatically
103
- - **Emojis & non-ASCII**: pass through unchanged — no accidental corruption
102
+ - **Emojis & non-ASCII**: pass through unchanged — no accidental
103
+ corruption
104
+
105
+ ## Limitations
106
+
107
+ Converting Markdown to LinkedIn-friendly text relies on Unicode
108
+ Mathematical Alphanumeric Symbols to simulate styling. This approach has
109
+ notable limitations:
110
+
111
+ - **Code Blocks**: Monospace Unicode characters do not enforce true
112
+ fixed-width alignment on proportional fonts (like LinkedIn’s default
113
+ font). As a result, indentation and column alignment in code blocks
114
+ will often break visually.
115
+ - **Tables**: Markdown tables are not converted — they pass through as
116
+ raw pipe syntax (`| col | col |`), which LinkedIn does not render,
117
+ producing unreadable output.
118
+ - **Accessibility**: Screen readers often read Unicode mathematical
119
+ characters aloud individually (e.g., “mathematical sans-serif bold b”)
120
+ instead of as complete words, making the content difficult for
121
+ visually impaired users to understand.
122
+ - **Searchability**: Text styled with these Unicode characters may not
123
+ be indexed properly by LinkedIn’s search algorithm, meaning people
124
+ searching for your keywords might not find your post.
104
125
 
105
126
  For more examples, check out the package documentation at:
106
127
  <https://www.indrapatil.com/md2linkedin/>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "md2linkedin"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "Convert Markdown to LinkedIn-friendly Unicode text"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -26,7 +26,7 @@ classifiers = [
26
26
  "Topic :: Text Processing :: Markup",
27
27
  "Topic :: Utilities",
28
28
  ]
29
- dependencies = ["click>=8.3.2"]
29
+ dependencies = ["click>=8.3.3"]
30
30
 
31
31
  [project.scripts]
32
32
  md2linkedin = "md2linkedin._cli:main"
@@ -42,14 +42,14 @@ Changelog = "https://github.com/IndrajeetPatil/md2linkedin/blob/main/CHANGELOG.m
42
42
  dev = [
43
43
  "coverage>=7.13.5",
44
44
  "jupyter>=1.1.1",
45
- "zensical>=0.0.31",
45
+ "zensical>=0.0.36",
46
46
  "mkdocstrings-python>=2.0.3",
47
- "ty>=0.0.29",
48
- "prek>=0.3.8",
49
- "pytest>=9.0.2",
47
+ "ty>=0.0.32",
48
+ "prek>=0.3.10",
49
+ "pytest>=9.0.3",
50
50
  "pytest-cov>=7.1.0",
51
51
  "pytest-random-order>=1.2.0",
52
- "ruff>=0.15.9",
52
+ "ruff>=0.15.11",
53
53
  "add-trailing-comma>=4.0.0",
54
54
  ]
55
55
 
@@ -317,7 +317,7 @@ def _convert_bullets(text: str) -> str:
317
317
  indent = m.group(1)
318
318
  return " ‣ " if len(indent) >= _NESTED_BULLET_MIN_INDENT else "• "
319
319
 
320
- return re.sub(r"^(\s*)[-*+] ", _bullet, text, flags=re.MULTILINE)
320
+ return re.sub(r"^([ \t]*)[-*+] ", _bullet, text, flags=re.MULTILINE)
321
321
 
322
322
 
323
323
  def _strip_blockquotes(text: str) -> str:
File without changes