Skip to content

code-fold: true is not working for the chunk with included code from external script #1

@shafayetShafee

Description

@shafayetShafee

While this filter does include codes from an External file, code-fold: true or code-summary: "some text" is not working for that code chunk (that includes the source code). A quick reproducible example is as follows,

test.py

# code from test.py
for name in ["Sam", "Jake"]:
    print(f"Hello {name}!")

test.qmd

---
title: "Including Code"
format:
  html:
    code-fold: true
    code-summary: "Python Code"
jupyter: python3
filters: 
  - include-code-files
---

## Python

```{.python include="test.py"}
```

```{python}
print("Hello World")
```

output

image

I am using Quarto version,

$ quarto --version
1.2.235

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions