Skip to content

Commit ac0156c

Browse files
committed
add regression test and changelog entry
1 parent a9e4dd9 commit ac0156c

File tree

4 files changed

+287
-0
lines changed

4 files changed

+287
-0
lines changed

news/changelog-1.8.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,4 @@ All changes included in 1.8:
8383

8484
- ([#11321](https://github.com/quarto-dev/quarto-cli/issues/11321)): Follow [recommendation from LaTeX project](https://latex-project.org/news/latex2e-news/ltnews40.pdf) and use `lualatex` instead of `xelatex` as the default PDF engine.
8585
- ([#12782](https://github.com/quarto-dev/quarto-cli/pull/12782)): fix bug on `safeRemoveDirSync`'s detection of safe directory boundaries.
86+
- ([#12853](https://github.com/quarto-dev/quarto-cli/issues/12853)): fix replaceAll() escaping issue with embedded notebooks containing `$` in their Markdown.
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
.jupyter_cache
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
# .python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# UV
99+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100+
# This is especially recommended for binary packages to ensure reproducibility, and is more
101+
# commonly ignored for libraries.
102+
#uv.lock
103+
104+
# poetry
105+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106+
# This is especially recommended for binary packages to ensure reproducibility, and is more
107+
# commonly ignored for libraries.
108+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109+
#poetry.lock
110+
111+
# pdm
112+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113+
#pdm.lock
114+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
115+
# in version control.
116+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
117+
.pdm.toml
118+
.pdm-python
119+
.pdm-build/
120+
121+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
122+
__pypackages__/
123+
124+
# Celery stuff
125+
celerybeat-schedule
126+
celerybeat.pid
127+
128+
# SageMath parsed files
129+
*.sage.py
130+
131+
# Environments
132+
.env
133+
.venv
134+
env/
135+
venv/
136+
ENV/
137+
env.bak/
138+
venv.bak/
139+
140+
# Spyder project settings
141+
.spyderproject
142+
.spyproject
143+
144+
# Rope project settings
145+
.ropeproject
146+
147+
# mkdocs documentation
148+
/site
149+
150+
# mypy
151+
.mypy_cache/
152+
.dmypy.json
153+
dmypy.json
154+
155+
# Pyre type checker
156+
.pyre/
157+
158+
# pytype static type analyzer
159+
.pytype/
160+
161+
# Cython debug symbols
162+
cython_debug/
163+
164+
# PyCharm
165+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
166+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
167+
# and can be added to the global gitignore or merged into this file. For a more nuclear
168+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
169+
#.idea/
170+
171+
# Ruff stuff:
172+
.ruff_cache/
173+
174+
# PyPI configuration file
175+
.pypirc
176+
177+
# MACOS
178+
.DS_Store
179+
180+
# Files generated by invoking Julia with --code-coverage
181+
*.jl.cov
182+
*.jl.*.cov
183+
*.jl.mem
184+
185+
Manifest.toml
186+
187+
.vscode
188+
189+
# System-specific files and directories generated by the BinaryProvider and BinDeps packages
190+
# They contain absolute paths specific to the host computer, and so should not be committed
191+
deps/deps.jl
192+
deps/build.log
193+
deps/downloads/
194+
deps/usr/
195+
deps/src/
196+
197+
# these are all temporary files that will be generated during Quarto render
198+
/.quarto/
199+
/_freeze/
200+
/_site/
201+
/_output/
202+
/_book/
203+
/index_files/
204+
*.embed_files/
205+
*.html
206+
*.gif
207+
*.json
208+
/site_libs/
209+
_tmp_fig.svg
210+
211+
# Files generated from Binder
212+
.TinyTeX
213+
.code-server
214+
.config
215+
.local
216+
.yarn
217+
.jupyter-server-log.txt
218+
.profile
219+
.bashrc
220+
.bash_logout
221+
.wget-hsts
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Home Page
3+
format:
4+
html: default
5+
pdf: default
6+
---
7+
8+
## From an embedded notebook
9+
10+
{{< embed somefolder/_somefile.qmd#plot-phase-space-density echo=true >}}
11+
12+
## Still from an embedded notebook
13+
14+
{{< embed somefolder/_somefile.qmd#plot-final-density echo=true >}}
15+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Some File
2+
3+
```{python}
4+
#| label: import-libraries
5+
6+
import numpy as np
7+
import matplotlib.pyplot as plt
8+
from IPython.display import SVG
9+
```
10+
11+
Some text...
12+
13+
```{python}
14+
#| label: plot-phase-space-density
15+
16+
from IPython.display import HTML
17+
from matplotlib.animation import FuncAnimation
18+
19+
N_x = 101
20+
N_px = 101
21+
22+
x_list = np.linspace(-2, 2, N_x)
23+
px_list = np.linspace(-2, 2, N_px)
24+
t_list = np.linspace(0, 2, 50000)
25+
26+
rho_t = np.random.rand(N_x, N_px)
27+
28+
fig, ax = plt.subplots()
29+
30+
img = ax.pcolormesh(x_list, px_list, rho_t**2, shading='gouraud', rasterized=True)
31+
ax.set_xlabel('Position $x$')
32+
ax.set_ylabel('Momentum $p_x$')
33+
34+
plt.show()
35+
```
36+
37+
Other text...
38+
39+
```{python}
40+
#| label: plot-final-density
41+
42+
fig, ax = plt.subplots()
43+
44+
img = ax.pcolormesh(x_list, px_list, rho_t**2, shading='gouraud', rasterized=True)
45+
ax.set_xlabel('Position $x$')
46+
ax.set_ylabel('Momentum $p_x$')
47+
48+
plt.show()
49+
```
50+

0 commit comments

Comments
 (0)