-
Notifications
You must be signed in to change notification settings - Fork 393
Closed
Labels
bugSomething isn't workingSomething isn't workingregressionFunctionality that used to work but now is broken.Functionality that used to work but now is broken.
Milestone
Description
---
title: foo
format: commonmark
keep-md: true
---
```{.python filename="matplotlib.py"}
import matplotlib.pyplot as plt
plt.plot([1,23,2,4])
plt.show()
```This outputs with latest 1.3
# foo
``` python
import matplotlib.pyplot as plt
plt.plot([1,23,2,4])
plt.show()
```but it outputs with latest 1.2 release
foo
================
<div class="code-with-filename">
**matplotlib.py**
``` python
import matplotlib.pyplot as plt
plt.plot([1,23,2,4])
plt.show()
```
</div>
It was lost in https://github.com/quarto-dev/quarto-cli/pull/4118/files#diff-3c9439f2bc27c905f44644b44dee252c2d2729b5da73484cbfc22e814137f98d while introducing DecoratedCodeBlock I believe.
@cscheid is it a regression on purpose ? Or could we port back the old behavior ?
Previously we did
return pandoc.Div(
{ pandoc.Plain{pandoc.Strong{pandoc.Str(filename)}}, el:clone() },
pandoc.Attr("", {"code-with-filename"})
)for non HTML format and now we just return the content of the code block
quarto-cli/src/resources/filters/customnodes/decoratedcodeblock.lua
Lines 106 to 109 in 37ce045
| else | |
| -- return the code block unadorned | |
| -- this probably could be improved | |
| return el |
(from a discussion in #5101)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingregressionFunctionality that used to work but now is broken.Functionality that used to work but now is broken.