Skip to content

Commit 5ee0b2e

Browse files
authored
bugfix/issue-3630 (#4013)
Closes #3630
1 parent 6650d80 commit 5ee0b2e

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

news/changelog-1.3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Add support for linking to source notebooks that provide embedded content. Control using `notebook-links`
1818
- Improve callout wrapping behavior for long strings with no word breaks.
1919
- Add overflow to tables generated from SQL code cells ([#3497](https://github.com/quarto-dev/quarto-cli/issues/3497)).
20+
- Fix support for parquet files in OJS code cells ([#3630](https://github.com/quarto-dev/quarto-cli/issues/3630)).
2021

2122
## Article Layout
2223

src/resources/formats/html/ojs/quarto-ojs-runtime.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// quarto-ojs-runtime v0.0.15 Copyright 2022 undefined
1+
// quarto-ojs-runtime v0.0.15 Copyright 2023 undefined
22
var EOL = {},
33
EOF = {},
44
QUOTE = 34,
@@ -19974,19 +19974,22 @@ function createRuntime() {
1997419974
return localResolver[n];
1997519975
}
1997619976

19977-
const name = (() => {
19978-
if (n.startsWith("/")) {
19979-
// docToRoot can be empty, in which case naive concatenation creates
19980-
// an absolute path.
19981-
if (quartoOjsGlobal.paths.docToRoot === "") {
19982-
return `.${n}`;
19983-
} else {
19984-
return `${quartoOjsGlobal.paths.docToRoot}${n}`;
19985-
}
19977+
let name;
19978+
const currentPath = window.location.href.replace(/[^/]*$/, '');
19979+
19980+
if (n.startsWith("/")) {
19981+
// docToRoot can be empty, in which case naive concatenation creates
19982+
// an absolute path.
19983+
if (quartoOjsGlobal.paths.docToRoot === "") {
19984+
name = `${currentPath}.${n}`;
1998619985
} else {
19987-
return n;
19988-
}
19989-
})();
19986+
name = `${currentPath}${quartoOjsGlobal.paths.docToRoot}${n}`;
19987+
}
19988+
} else if (n.startsWith("http")) {
19989+
name = n;
19990+
} else {
19991+
name = `${currentPath}${n}`;
19992+
}
1999019993

1999119994
const mimeType = mime.getType(name);
1999219995

src/resources/formats/html/ojs/quarto-ojs-runtime.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)