Skip to content

Commit 493aaf1

Browse files
committed
Treat center like a block-level element
Fixes Python-Markdown#1481
1 parent 900e85d commit 493aaf1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
as they are parsed outside of "markdown" blocks giving a more consistent
2424
expectation to external extensions (#1503).
2525
* `md_in_html` handle tags within inline code blocks better (#1075).
26-
* `md_in_html` fix handling of one-liner block HTML handling (#1074)
26+
* `md_in_html` fix handling of one-liner block HTML handling (#1074).
27+
* Ensure `<center>` is treated like a block-level element.
2728

2829
## [3.7] -- 2024-08-16
2930

markdown/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
# Other elements which Markdown should not be mucking up the contents of.
5555
'canvas', 'colgroup', 'dd', 'body', 'dt', 'group', 'html', 'iframe', 'li', 'legend',
5656
'math', 'map', 'noscript', 'output', 'object', 'option', 'progress', 'script',
57-
'style', 'summary', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'tr', 'video'
57+
'style', 'summary', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'tr', 'video',
58+
'center'
5859
]
5960
"""
6061
List of HTML tags which get treated as block-level elements. Same as the `block_level_elements`

0 commit comments

Comments
 (0)