Skip to content

Commit 60ef541

Browse files
authored
Merge pull request #1 from magnified103/master
Merge tag/2.4.13 from upstream
2 parents a5673ca + bee39a8 commit 60ef541

236 files changed

Lines changed: 3493 additions & 515 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Report a parsing error, unexpected output and other bugs
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Attach a minimal markdown snippet that causes the bug to occur. This should be placed inside a fenced code block to escape GitHub's formatting.
15+
16+
If your snippet contains fenced code blocks then you can escape them by adding more backticks to the enclosing block. See the [this GitHub article](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#fenced-code-blocks) for an example.
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Debug info**
22+
Version of library being used:
23+
24+
Any extras being used:
25+
26+
**Additional context**
27+
Add any other context about the problem here.

.github/workflows/python.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ on:
66
branches: [ master ]
77
jobs:
88
build:
9-
runs-on: ubuntu-latest
9+
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
python-version: [pypy3, 3.5, 3.6, 3.7, 3.8, 3.9]
12+
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
13+
os:
14+
- ubuntu-20.04
15+
- macos-latest
16+
- windows-latest
1317
steps:
1418
- uses: actions/checkout@v2
1519
- name: Set up Python ${{ matrix.python-version }}
@@ -19,7 +23,7 @@ jobs:
1923
- name: Install dependencies
2024
run: |
2125
python -m pip install --upgrade pip
22-
pip install Pygments>=2.5.2
26+
pip install .[all]
2327
- name: Test
2428
run: |
2529
make testone

CHANGES.md

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,125 @@
11
# python-markdown2 Changelog
22

3-
## python-markdown2 2.4.2 (not yet released)
3+
## python-markdown2 2.4.13
4+
5+
- [pull #559] Allow cuddled tables (#557)
6+
- [pull #560] Fix `markdown-in-html` not always splitting HTML tags into separate lines (#558)
7+
- [pull #564] Fix incomplete comments in safe mode not being escaped (#563)
8+
- [pull #566] Fix crash in `markdown-in-html` extra (#565)
9+
10+
11+
## python-markdown2 2.4.12
12+
13+
- [pull #547] Update `markdown-in-html` extra to handle markdown on same line as HTML (#546)
14+
- [pull #550] Fix tables with trailing whitespace not being recognized (#549)
15+
- [pull #545] Fix multiple instances of strong emphasis (`**`) in one line (#541)
16+
- [pull #556] Fix incorrect parsing of links after square brackets (#552)
17+
18+
## python-markdown2 2.4.11
19+
20+
- [pull #524] Fix angles being escaped in style blocks (issue #523)
21+
- [pull #527] Fix base64 images being corrupted in safe mode (issue #526)
22+
- [pull #529] Add `breaks` extra with ability to hard break on backslashes (issue #525)
23+
- [pull #532] Fix #493 persisting when `code-friendly` extra enabled
24+
- [pull #535] Update `_slugify` to use utf-8 encoding (issue #534)
25+
- [pull #536] Maintain order of appearance in footnotes
26+
- [pull #538] Include HTML headers in TOC
27+
- [pull #540] Add mechanism to prevent header ID counter resetting (issue #530)
28+
29+
## python-markdown2 2.4.10
30+
31+
- [pull #520] Allow more relative links in safe mode (issue #517)
32+
- [pull #521] Always restore hashed HTML blocks (issue #185)
33+
- [pull #522] Add `middle-word-em` extra
34+
35+
36+
## python-markdown2 2.4.9
37+
38+
- [pull #500] Add `<thead>` tag to html-classes extra
39+
- [pull #501] Fix link patterns extra matching against internal hashes
40+
- [pull #502] Replace deprecated `optparse` with `argparse`
41+
- [pull #506] Fix `_uniform_outdent` failing with empty strings (issue #505)
42+
- [pull #509] Fix HTML elements not unhashing correctly (issue 508)
43+
- [pull #511] Remove deprecated `imp` module (issue #510)
44+
- [pull #512] Allow link patterns to be passed via extras dict
45+
- [pull #513] Fix relative links not working in safe mode (issue #254)
46+
47+
48+
## python-markdown2 2.4.8
49+
50+
- [pull #499] Fix images not being procesed correctly (#498)
51+
52+
53+
## python-markdown2 2.4.7
54+
55+
- [pull #483] Fix hashing nested HTML blocks
56+
- [pull #486] Fix backslash being unable to escape raw HTML tags
57+
- [pull #482] Add support for telegram spoiler in extras
58+
- [pull #485] mermaid support
59+
- [pull #487] Fix escaping ampersands in hrefs
60+
- [pull #490] Fix indented codeblocks inside fences (#489)
61+
- [pull #490] Remove `code-color` extra
62+
63+
64+
## python-markdown2 2.4.6
65+
66+
- [pull #477] Feature wavedrom support
67+
- [pull #480] Fix mixing ordered and un-ordered lists combining into single list type
68+
69+
70+
## python-markdown2 2.4.5
71+
72+
- [pull #466] Add optional dependencies to `setup.py`
73+
74+
75+
## python-markdown2 2.4.4
76+
77+
- [pull #439] Fix TypeError if html-classes extra is None
78+
- [pull #441] Remove Python2 support
79+
- [pull #445] Replace `<strike>` with `<s>` in strike extra
80+
- [pull #446] Fix link patterns extra applying within links
81+
- [pull #443] create proper entry point
82+
- [pull #449] Codespans inside link text issue344
83+
- [pull #451] Underline and HTML comments
84+
- [pull #453] Links with brackets
85+
- [pull #454] Fix emacs local variable one-liners
86+
- [pull #457] Example of the current mixed-paragraph mode behavior in lists
87+
- [pull #455] Fix code block indentation in lists
88+
- [pull #434] Fix filter bypass leading to XSS (#362)
89+
- [pull #464] Fix html-classes extra not applying to code spans
90+
- [pull #462] Fix pygments block matching
91+
- [pull #462] Fix pyshell blocks in blockquotes
92+
- [pull #463] Fix multilevel lists
93+
- [pull #468] Remove `_uniform_outdent_limit` function
94+
- [pull #470] Add support for ordered lists that don't start at 1. (#469)
95+
- [pull #472] Fix `AssertionError` with lazy numbered lists (issue #471)
96+
- [pull #475] Add `<ul>` and `<ol>` tags to html-classes extra (#352)
97+
- [pull #473] XSS test and fix
98+
99+
100+
## python-markdown2 2.4.3
101+
102+
- [pull #413] Fix meta indentation
103+
- [pull #414] Fix code surrounded by blank lines inside blockquote fenced code blocks
104+
- [pull #417] Fix inline code pipe symbol within tables (issue #399)
105+
- [pull #418] Fix code block parsing error (issue #327)
106+
- [pull #419] Fix hr block created when not supposed to (issue #400)
107+
- [pull #421] Fix backslashes removed by adjacent code blocks (issues #369 and #412)
108+
- [pull #420] Fix md5-* in resulting HTML when several code blocks follow one by one (issue #355)
109+
- [pull #422] Fix excessive `<br>` tags in lists using break-on-newline extra (issue #394)
110+
- [pull #424] Standardize key and value definitions for metadata extra (issue #423)
111+
- [pull #427] Fix fenced code blocks breaking lists (issue #426)
112+
- [pull #429] Fix catastrophic backtracking (Regex DoS) in pyshell blocks.
113+
- [pull #431] Fix incorrect indentation of fenced code blocks within lists
114+
- [pull #436] RST admonitions
115+
- [pull #430] Improve error message if link_patterns forgotten
116+
- [pull #437] fix compatibility with pygments 2.12
117+
118+
119+
## python-markdown2 2.4.2
4120

5121
- [pull #408] Fix for fenced code blocks issue #396
122+
- [pull #410] Be more strict on auto linking urls, RE DOS fix
6123

7124

8125
## python-markdown2 2.4.1

CONTRIBUTORS.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,12 @@ André Nasturas (github.com/andrenasturas)
5050
Denis Kasak (github.com/dkasak)
5151
Maximilian Hils (github.com/mhils)
5252
BarkeH (github.com/BarkeH)
53+
cav71 (github.com/cav71)
54+
Crozzers (github.com/Crozzers)
55+
Bastian Venthur (https://github.com/venthur), removed Python2 support
56+
gitbra (github.com/gitbra)
57+
Łukasz Langa (github.com/ambv)
58+
Max Omdal (github.com/momja)
59+
Kishore (github.com/jk6521)
60+
Ircama (github.com/Ircama)
61+
Ankit Mahato (github.com/animator)

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ was written to closely match the behaviour of the original Perl-implemented
1313
Markdown.pl. Markdown2 also comes with a number of extensions (called
1414
"extras") for things like syntax coloring, tables, header-ids. See the
1515
"Extra Syntax" section below. "markdown2" supports all Python versions
16-
2.6+ or 3.3+ (and pypy and jython, though I don't frequently test those).
16+
3.5+ (and pypy and jython, though I don't frequently test those).
1717

1818
There is another [Python
1919
markdown.py](https://python-markdown.github.io/). However, at
@@ -33,6 +33,7 @@ for updates to python-markdown2.
3333
To install it in your Python installation run *one* of the following:
3434

3535
pip install markdown2
36+
pip install markdown2[all] # to install all optional dependencies (eg: Pygments for code syntax highlighting)
3637
pypm install markdown2 # if you use ActivePython (activestate.com/activepython)
3738
easy_install markdown2 # if this is the best you have
3839
python setup.py install
@@ -48,14 +49,14 @@ As a module:
4849
```python
4950
>>> import markdown2
5051
>>> markdown2.markdown("*boo!*") # or use `html = markdown_path(PATH)`
51-
u'<p><em>boo!</em></p>\n'
52+
'<p><em>boo!</em></p>\n'
5253

5354
>>> from markdown2 import Markdown
5455
>>> markdowner = Markdown()
5556
>>> markdowner.convert("*boo!*")
56-
u'<p><em>boo!</em></p>\n'
57+
'<p><em>boo!</em></p>\n'
5758
>>> markdowner.convert("**boom!**")
58-
u'<p><strong>boom!</strong></p>\n'
59+
'<p><strong>boom!</strong></p>\n'
5960
```
6061
As a script (CLI):
6162
```shell
@@ -88,7 +89,7 @@ as a script:
8889
```shell
8990
>>> import markdown2
9091
>>> markdown2.markdown("*boo!*", extras=["footnotes"])
91-
u'<p><em>boo!</em></p>\n'
92+
'<p><em>boo!</em></p>\n'
9293
```
9394
There are a number of currently implemented extras for tables, footnotes,
9495
syntax coloring of `<pre>`-blocks, auto-linking patterns, table of contents,

TODO.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
- py3: py2.4 test (broken?)
21
- add "smarty-pants" extra to wiki
32
- add "html-classes" extra to wiki
43
- more on the "code-color" extra wiki page

bin/markdown2

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)