Skip to content

Commit 9547ade

Browse files
committed
Merge remote-tracking branch 'upstream/master' into footnotes-order
2 parents a6d1e0f + 23c301d commit 9547ade

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

docs/changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ and this project adheres to the
1010
[Python Version Specification](https://packaging.python.org/en/latest/specifications/version-specifiers/).
1111
See the [Contributing Guide](contributing.md) for details.
1212

13-
## [unreleased] - Unreleased
13+
## [Unreleased]
1414

1515
### Fixed
1616

17+
* Fix handling of incomplete HTML tags in code spans in Python 3.14.
1718
* Fix issue with footnote ordering (#1367).
1819

1920
## [3.8.2] - 2025-06-19

markdown/htmlparser.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,20 @@
6969
)?
7070
\s* # trailing whitespace
7171
""", re.VERBOSE)
72+
htmlparser.locatetagend = re.compile(r"""
73+
[a-zA-Z][^`\t\n\r\f />]* # tag name
74+
[\t\n\r\f /]* # optional whitespace before attribute name
75+
(?:(?<=['"\t\n\r\f /])[^`\t\n\r\f />][^\t\n\r\f /=>]* # attribute name
76+
(?:= # value indicator
77+
(?:'[^']*' # LITA-enclosed value
78+
|"[^"]*" # LIT-enclosed value
79+
|(?!['"])[^>\t\n\r\f ]* # bare value
80+
)
81+
)?
82+
[\t\n\r\f /]* # possibly followed by a space
83+
)*
84+
>?
85+
""", re.VERBOSE)
7286

7387
# Match a blank line at the start of a block of text (two newlines).
7488
# The newlines may be preceded by additional whitespace.

0 commit comments

Comments
 (0)