markdownify 1.2.3__tar.gz → 1.2.4__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.
- {markdownify-1.2.3 → markdownify-1.2.4}/.github/workflows/python-app.yml +7 -7
- {markdownify-1.2.3 → markdownify-1.2.4}/.github/workflows/python-publish.yml +2 -2
- {markdownify-1.2.3 → markdownify-1.2.4}/PKG-INFO +10 -6
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify/__init__.py +6 -5
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify.egg-info/PKG-INFO +10 -6
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify.egg-info/requires.txt +0 -1
- {markdownify-1.2.3 → markdownify-1.2.4}/pyproject.toml +8 -5
- markdownify-1.2.4/shell.nix +13 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/tox.ini +1 -1
- markdownify-1.2.3/shell.nix +0 -10
- {markdownify-1.2.3 → markdownify-1.2.4}/.gitignore +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/LICENSE +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/MANIFEST.in +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/README.rst +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify/__init__.pyi +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify/main.py +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify/py.typed +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify.egg-info/SOURCES.txt +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify.egg-info/dependency_links.txt +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify.egg-info/entry_points.txt +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify.egg-info/not-zip-safe +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/markdownify.egg-info/top_level.txt +0 -0
- {markdownify-1.2.3 → markdownify-1.2.4}/setup.cfg +0 -0
|
@@ -16,10 +16,10 @@ jobs:
|
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
18
|
- uses: actions/checkout@v4
|
|
19
|
-
- name: Set up Python
|
|
20
|
-
uses: actions/setup-python@
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v7
|
|
21
21
|
with:
|
|
22
|
-
python-version: 3.
|
|
22
|
+
python-version: 3.15
|
|
23
23
|
- name: Install dependencies
|
|
24
24
|
run: |
|
|
25
25
|
python -m pip install --upgrade pip
|
|
@@ -37,14 +37,14 @@ jobs:
|
|
|
37
37
|
|
|
38
38
|
steps:
|
|
39
39
|
- uses: actions/checkout@v2
|
|
40
|
-
- name: Set up Python
|
|
41
|
-
uses: actions/setup-python@
|
|
40
|
+
- name: Set up Python
|
|
41
|
+
uses: actions/setup-python@v7
|
|
42
42
|
with:
|
|
43
|
-
python-version: 3.
|
|
43
|
+
python-version: 3.15
|
|
44
44
|
- name: Install dependencies
|
|
45
45
|
run: |
|
|
46
46
|
python -m pip install --upgrade pip
|
|
47
|
-
pip install --upgrade setuptools setuptools_scm wheel build tox mypy types-beautifulsoup4
|
|
47
|
+
pip install --upgrade setuptools setuptools_scm wheel build tox mypy pytest types-beautifulsoup4
|
|
48
48
|
- name: Check types
|
|
49
49
|
run: |
|
|
50
50
|
mypy .
|
|
@@ -15,9 +15,9 @@ jobs:
|
|
|
15
15
|
steps:
|
|
16
16
|
- uses: actions/checkout@v4
|
|
17
17
|
- name: Set up Python
|
|
18
|
-
uses: actions/setup-python@
|
|
18
|
+
uses: actions/setup-python@v7
|
|
19
19
|
with:
|
|
20
|
-
python-version: '3.
|
|
20
|
+
python-version: '3.15'
|
|
21
21
|
- name: Install dependencies
|
|
22
22
|
run: |
|
|
23
23
|
python -m pip install --upgrade pip
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: markdownify
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Convert HTML to markdown.
|
|
5
5
|
Author-email: Matthew Tretter <m@tthewwithanm.com>
|
|
6
6
|
Project-URL: Homepage, http://github.com/matthewwithanm/python-markdownify
|
|
@@ -10,17 +10,21 @@ Classifier: Framework :: Django
|
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Programming Language :: Python :: 2.5
|
|
14
|
-
Classifier: Programming Language :: Python :: 2.6
|
|
15
|
-
Classifier: Programming Language :: Python :: 2.7
|
|
16
13
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
14
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
19
23
|
Classifier: Topic :: Utilities
|
|
20
24
|
Description-Content-Type: text/x-rst
|
|
21
25
|
License-File: LICENSE
|
|
22
26
|
Requires-Dist: beautifulsoup4<5,>=4.9
|
|
23
|
-
|
|
27
|
+
Dynamic: license-file
|
|
24
28
|
|
|
25
29
|
|build| |version| |license| |downloads|
|
|
26
30
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from bs4 import BeautifulSoup, Comment, Doctype, NavigableString, Tag
|
|
2
2
|
from textwrap import fill
|
|
3
3
|
import re
|
|
4
|
-
import six
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
# General-purpose regex patterns
|
|
@@ -9,7 +8,9 @@ re_convert_heading = re.compile(r'convert_h(\d+)')
|
|
|
9
8
|
re_line_with_content = re.compile(r'^(.*)', flags=re.MULTILINE)
|
|
10
9
|
re_whitespace = re.compile(r'[\t ]+')
|
|
11
10
|
re_all_whitespace = re.compile(r'[\t \r\n]+')
|
|
12
|
-
|
|
11
|
+
# (the lookbehind only lets a match start at the beginning of a whitespace run;
|
|
12
|
+
# without it, a long run of spaces with no newline is rescanned from every position)
|
|
13
|
+
re_newline_whitespace = re.compile(r'(?<![\t \r\n])[\t \r\n]*[\r\n][\t \r\n]*')
|
|
13
14
|
re_html_heading = re.compile(r'h(\d+)')
|
|
14
15
|
re_pre_lstrip1 = re.compile(r'^ *\n')
|
|
15
16
|
re_pre_rstrip1 = re.compile(r'\n *$')
|
|
@@ -75,7 +76,7 @@ def strip1_pre(text):
|
|
|
75
76
|
def strip_pre(text):
|
|
76
77
|
"""Strip all leading and trailing newlines from a <pre> string."""
|
|
77
78
|
text = re_pre_lstrip.sub('', text)
|
|
78
|
-
text =
|
|
79
|
+
text = text.rstrip(' \n')
|
|
79
80
|
return text
|
|
80
81
|
|
|
81
82
|
|
|
@@ -249,7 +250,7 @@ class MarkdownConverter(object):
|
|
|
249
250
|
# (subclasses of NavigableString, must test first)
|
|
250
251
|
return True
|
|
251
252
|
elif isinstance(el, NavigableString):
|
|
252
|
-
if
|
|
253
|
+
if str(el).strip() != '':
|
|
253
254
|
# Non-whitespace text nodes are always processed.
|
|
254
255
|
return False
|
|
255
256
|
elif should_remove_inside and (not el.previous_sibling or not el.next_sibling):
|
|
@@ -345,7 +346,7 @@ class MarkdownConverter(object):
|
|
|
345
346
|
if parent_tags is None:
|
|
346
347
|
parent_tags = set()
|
|
347
348
|
|
|
348
|
-
text =
|
|
349
|
+
text = str(el)
|
|
349
350
|
|
|
350
351
|
# normalize whitespace if we're not inside a preformatted element
|
|
351
352
|
if 'pre' not in parent_tags:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: markdownify
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Convert HTML to markdown.
|
|
5
5
|
Author-email: Matthew Tretter <m@tthewwithanm.com>
|
|
6
6
|
Project-URL: Homepage, http://github.com/matthewwithanm/python-markdownify
|
|
@@ -10,17 +10,21 @@ Classifier: Framework :: Django
|
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Programming Language :: Python :: 2.5
|
|
14
|
-
Classifier: Programming Language :: Python :: 2.6
|
|
15
|
-
Classifier: Programming Language :: Python :: 2.7
|
|
16
13
|
Classifier: Programming Language :: Python :: 3.6
|
|
17
14
|
Classifier: Programming Language :: Python :: 3.7
|
|
18
15
|
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
19
23
|
Classifier: Topic :: Utilities
|
|
20
24
|
Description-Content-Type: text/x-rst
|
|
21
25
|
License-File: LICENSE
|
|
22
26
|
Requires-Dist: beautifulsoup4<5,>=4.9
|
|
23
|
-
|
|
27
|
+
Dynamic: license-file
|
|
24
28
|
|
|
25
29
|
|build| |version| |license| |downloads|
|
|
26
30
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "markdownify"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.4"
|
|
8
8
|
authors = [{name = "Matthew Tretter", email = "m@tthewwithanm.com"}]
|
|
9
9
|
description = "Convert HTML to markdown."
|
|
10
10
|
readme = "README.rst"
|
|
@@ -14,17 +14,20 @@ classifiers = [
|
|
|
14
14
|
"Intended Audience :: Developers",
|
|
15
15
|
"License :: OSI Approved :: MIT License",
|
|
16
16
|
"Operating System :: OS Independent",
|
|
17
|
-
"Programming Language :: Python :: 2.5",
|
|
18
|
-
"Programming Language :: Python :: 2.6",
|
|
19
|
-
"Programming Language :: Python :: 2.7",
|
|
20
17
|
"Programming Language :: Python :: 3.6",
|
|
21
18
|
"Programming Language :: Python :: 3.7",
|
|
22
19
|
"Programming Language :: Python :: 3.8",
|
|
20
|
+
"Programming Language :: Python :: 3.9",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Programming Language :: Python :: 3.15",
|
|
23
27
|
"Topic :: Utilities",
|
|
24
28
|
]
|
|
25
29
|
dependencies = [
|
|
26
30
|
"beautifulsoup4>=4.9,<5",
|
|
27
|
-
"six>=1.15,<2"
|
|
28
31
|
]
|
|
29
32
|
|
|
30
33
|
[project.urls]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{ pkgs ? import <nixpkgs> {} }:
|
|
2
|
+
pkgs.mkShell {
|
|
3
|
+
name = "python-shell";
|
|
4
|
+
buildInputs = with pkgs; [
|
|
5
|
+
python315
|
|
6
|
+
python314Packages.tox
|
|
7
|
+
python314Packages.setuptools
|
|
8
|
+
python314Packages.virtualenv
|
|
9
|
+
python314Packages.mypy
|
|
10
|
+
python314Packages.types-beautifulsoup4
|
|
11
|
+
python314Packages.pytest
|
|
12
|
+
];
|
|
13
|
+
}
|
markdownify-1.2.3/shell.nix
DELETED
|
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
|