@@ -2581,8 +2581,7 @@ def test_nested_task_list(
25812581 * [x] Task B2
25822582 * [ ] Task B3
25832583
2584- A rogue paragraph with a reference to
2585- the `parent task_list <task_list_example>`.
2584+ A rogue paragraph.
25862585
25872586 - A list item without a checkbox.
25882587 - [ ] Another bullet point.
@@ -2603,11 +2602,7 @@ def test_nested_task_list(
26032602 # The rogue paragraph is nested within Task B
26042603 # Note: The actual output has the text split across multiple rich text
26052604 # segments
2606- rogue_paragraph = UnoParagraph (
2607- text = text (text = "A rogue paragraph with a reference to\n the " )
2608- + text (text = "parent task_list <task_list_example>" )
2609- + text (text = "." )
2610- )
2605+ rogue_paragraph = UnoParagraph (text = text (text = "A rogue paragraph." ))
26112606 task_b .append (blocks = [rogue_paragraph ])
26122607
26132608 # Regular bullet list items should be nested within Task B as bullet items
@@ -2668,3 +2663,25 @@ def test_task_list_quote(
26682663 tmp_path = tmp_path ,
26692664 extensions = ("sphinx_notion" , "sphinx_immaterial.task_lists" ),
26702665 )
2666+
2667+
2668+ def test_inline_single_backticks (
2669+ * ,
2670+ make_app : Callable [..., SphinxTestApp ],
2671+ tmp_path : Path ,
2672+ ) -> None :
2673+ """
2674+ Reproduces a bug where we got confused by mismatching blocks.
2675+ """
2676+ rst_content = """
2677+ A `B`
2678+ """
2679+ expected_objects : list [Block ] = [
2680+ UnoParagraph (text = text (text = "A " ) + text (text = "B" , italic = True )),
2681+ ]
2682+ _assert_rst_converts_to_notion_objects (
2683+ rst_content = rst_content ,
2684+ expected_objects = expected_objects ,
2685+ make_app = make_app ,
2686+ tmp_path = tmp_path ,
2687+ )
0 commit comments