While the ability to execute code in a markdown file is awesome, there needs to be some way to disable this. I.e. in usecases like this:
If you want to delete everything on your harddrive, you can do this
Needless to say, someone should not be able to accidentally execute this cell with shift-enter... but I still want to be able to use code-fences to format code.
Not sure of the best option. Here are some alternatives:
- Different syntax for executable cells. (This is sort of following the Jupyter book syntax.)
```bash
# This will only render as code
ls -la
```
```{code-cell} bash
# This will execute.
ls -la
```
- Code only executes if there is a preamble defining the kernels for which code should be executed.
This would break the case where people upload a markdown file and then want to execute cells, but they are all dead. The UI could easily fix this.
While the ability to execute code in a markdown file is awesome, there needs to be some way to disable this. I.e. in usecases like this:
Needless to say, someone should not be able to accidentally execute this cell with shift-enter... but I still want to be able to use code-fences to format code.
Not sure of the best option. Here are some alternatives:
This would break the case where people upload a markdown file and then want to execute cells, but they are all dead. The UI could easily fix this.