quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
280 stars 19 forks source link

"Run Cell" won't work with cell under list item using a letter #393

Open levibaguley opened 3 months ago

levibaguley commented 3 months ago

I'm using using quarto with the vscode extension. When I have a python cell as part of a sub-list item and I run the cell, it attempts to run the whole cell along with the fenced code delimiter . Here is an example:

---
title: "Code Cell In Sublist"
format: typst
---

Here is a list with some code cells

1.  This is item 1. 

    a.  this is item 1.a

        ```{python}  
        # Run Cell doesn't work since ```{python} is sent
        print("Hello from item 1.a")
  1. This is item 2.

    # Run Cell works. ```{python} is not included
    print("hello from item 2")
    
    quarto version: 1.4.550
    quarto extension 1.111.0 
    jupyter extension 2024.2.0 
    windows 10

image

Note that this document renders perfectly with item 1a indented more than the code in item 2. It's just that the interactive portion isn't working.

levibaguley commented 3 months ago

The plot thickens. It's actually not the fact that the code is in a sub-list that breaks running the cell, it's the fact that the code is under list items that have a letter used. Again, it renders just fine.

---
title: "Code Cell In Lists"
format: typst
---

Here is a list with some code cells

1.  This is item 1. 

    a.  This is item 1.a

        ```{python}  
        # Run Cell doesn't work since ```{python} is sent
        print("Hello from item 1.a")
  1. This is item 2.

    1. This is item 2.1

      # Run Cell works. ```{python} is not included
      print("Hello from item 2.1")
      1. This is item 2.1.1

        # Run Cell works. ```{python} is not included
        print("Hello from item 2.1.1")
        
        ![image](https://github.com/quarto-dev/quarto/assets/48003136/17ed1113-6c6c-4f42-9d61-c6113d0b69c7)