Skip to content

Commit 6347c57

Browse files
authored
Treat center like a block-level element
Fixes #1481
1 parent 900e85d commit 6347c57

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/changelog.md

+2-1
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 (#1481).
2728

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

markdown/util.py

+2-1
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)