File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 4747# TODO: Raise errors from list methods in the future.
4848# Later, remove this class entirely and use a regular set.
4949class _BlockLevelElements :
50+ # This hybrid list/set container exists for backwards compatibility reasons,
51+ # to support using both the `BLOCK_LEVEL_ELEMENTS` global variable (soft-deprecated)
52+ # and the `Markdown.block_level_elements` instance attribute (preferred) as a list or a set.
53+ # When we stop supporting list methods on these objects, we can remove the container
54+ # as well as the `test_block_level_elements` test module.
55+
5056 def __init__ (self , elements : list [str ], / ) -> None :
5157 self ._list = elements .copy ()
5258 self ._set = set (self ._list )
Original file line number Diff line number Diff line change 2222===============================
2323
2424Tests specific to the hybrid list/set container for block level elements.
25+
26+ The hybrid list/set container exists for backwards compatibility reasons,
27+ to support using both the `BLOCK_LEVEL_ELEMENTS` global variable (soft-deprecated)
28+ and the `Markdown.block_level_elements` instance attribute (preferred) as a list or a set.
29+ When we stop supporting list methods on these objects, we can remove the container
30+ as well as this test module.
2531"""
2632
2733import unittest
You can’t perform that action at this time.
0 commit comments