← Về thư mục
scripts/test_block_parser.py
- _kinds · function · L27-L28 — def _kinds(text: str) -> list[str]
- TestSegmentation · class · L31-L113 — class TestSegmentation(unittest.TestCase)
- test_blank_separated_paragraphs · method · L32-L35 — def test_blank_separated_paragraphs(self)
- test_multiline_paragraph_is_one_block · method · L37-L39 — def test_multiline_paragraph_is_one_block(self)
- test_atx_heading_is_single_line_block · method · L41-L43 — def test_atx_heading_is_single_line_block(self)
- test_heading_interrupts_text_run · method · L45-L47 — def test_heading_interrupts_text_run(self)
- test_fenced_code_never_split · method · L49-L52 — def test_fenced_code_never_split(self)
- test_tilde_fence · method · L54-L56 — def test_tilde_fence(self)
- test_unterminated_fence_rejected · method · L58-L61 — def test_unterminated_fence_rejected(self)
- test_table_run_is_one_block · method · L63-L66 — def test_table_run_is_one_block(self)
- test_list_run_with_indented_continuation · method · L68-L71 — def test_list_run_with_indented_continuation(self)
- test_loose_list_blank_inside_run · method · L73-L76 — def test_loose_list_blank_inside_run(self)
- test_ordered_list · method · L78-L80 — def test_ordered_list(self)
- test_blockquote_run · method · L82-L84 — def test_blockquote_run(self)
- test_frontmatter_skipped_never_labeled · method · L86-L91 — def test_frontmatter_skipped_never_labeled(self)
- test_unterminated_frontmatter_rejected · method · L93-L96 — def test_unterminated_frontmatter_rejected(self)
- test_spans_reconstruct_document · method · L98-L108 — def test_spans_reconstruct_document(self)
- test_no_trailing_newline_final_block · method · L110-L113 — def test_no_trailing_newline_final_block(self)
- TestMarkers · class · L116-L165 — class TestMarkers(unittest.TestCase)
- test_marker_attaches_to_following_block · method · L117-L120 — def test_marker_attaches_to_following_block(self)
- test_unlabeled_block_has_no_id · method · L122-L124 — def test_unlabeled_block_has_no_id(self)
- test_orphan_marker_before_blank_rejected · method · L126-L130 — def test_orphan_marker_before_blank_rejected(self)
- test_orphan_marker_at_eof_rejected · method · L132-L135 — def test_orphan_marker_at_eof_rejected(self)
- test_marker_stack_rejected · method · L137-L140 — def test_marker_stack_rejected(self)
- test_duplicate_block_ids_rejected · method · L142-L146 — def test_duplicate_block_ids_rejected(self)
- test_marker_inside_fence_is_content · method · L148-L152 — def test_marker_inside_fence_is_content(self)
- test_next_fresh_id_is_max_plus_one · method · L154-L157 — def test_next_fresh_id_is_max_plus_one(self)
- test_marker_grammar_requires_exact_shape · method · L159-L165 — def test_marker_grammar_requires_exact_shape(self): # A near-miss marker line (missing the B prefix) is not a marker; # it is text content and merges with the adjacent text run.
- TestUnsupportedConstructs · class · L168-L197 — class TestUnsupportedConstructs(unittest.TestCase)
- test_setext_underline_rejected_by_name · method · L169-L172 — def test_setext_underline_rejected_by_name(self)
- test_setext_dashes_rejected · method · L174-L177 — def test_setext_dashes_rejected(self)
- test_thematic_break_after_blank_is_plain_text · method · L179-L181 — def test_thematic_break_after_blank_is_plain_text(self)
- test_raw_html_opener_rejected_by_name · method · L183-L186 — def test_raw_html_opener_rejected_by_name(self)
- test_footnote_definition_rejected_by_name · method · L188-L191 — def test_footnote_definition_rejected_by_name(self)
- test_inline_ref_marker_is_not_html_opener · method · L193-L197 — def test_inline_ref_marker_is_not_html_opener(self): # v3.7.1 citation markers start with <!-- which the raw-HTML # detector (^</?[A-Za-z]) must not catch.
- TestFragmentMode · class · L200-L223 — class TestFragmentMode(unittest.TestCase)
- test_fragment_segments_multi_paragraph · method · L201-L203 — def test_fragment_segments_multi_paragraph(self)
- test_fragment_rejects_embedded_marker · method · L205-L208 — def test_fragment_rejects_embedded_marker(self)
- test_fragment_rejects_empty · method · L210-L213 — def test_fragment_rejects_empty(self)
- test_fragment_has_no_frontmatter_detection · method · L215-L219 — def test_fragment_has_no_frontmatter_detection(self): # A leading --- in a fragment is not frontmatter; --- after # nothing is a one-line text block (thematic-break shape).
- test_fragment_rejects_unsupported_constructs · method · L221-L223 — def test_fragment_rejects_unsupported_constructs(self)
- TestNormalizationAndHashes · class · L226-L255 — class TestNormalizationAndHashes(unittest.TestCase)
- test_crlf_normalized_for_hash_only · method · L227-L231 — def test_crlf_normalized_for_hash_only(self)
- test_blank_edges_stripped_intraline_whitespace_kept · method · L233-L237 — def test_blank_edges_stripped_intraline_whitespace_kept(self)
- test_hash_is_12_hex · method · L239-L241 — def test_hash_is_12_hex(self)
- test_base_draft_hash_is_12_hex_over_bytes · method · L243-L245 — def test_base_draft_hash_is_12_hex_over_bytes(self)
- test_crlf_and_lf_blocks_hash_equal · method · L247-L250 — def test_crlf_and_lf_blocks_hash_equal(self)
- test_split_lines_keepends_no_unicode_linebreak_split · method · L252-L255 — def test_split_lines_keepends_no_unicode_linebreak_split(self): # U+2028 must NOT split lines (str.splitlines would).