Skip to content

Commit 16be836

Browse files
committed
svg, xml format
1 parent 9a4b917 commit 16be836

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lib/interpreters.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export function getInterpreterExtension(format: Cell["format"]): string {
1818
case "tsv":
1919
case "png":
2020
case "gif":
21+
case "svg":
2122
case "webp":
23+
case "xml":
2224
return `.${format}`;
2325
default:
2426
return ".bin";
@@ -32,6 +34,7 @@ export function getInterpreterMethod(format: Cell["format"]): string {
3234
case "json":
3335
case "blob":
3436
case "text":
37+
case "xml":
3538
return `.${format}()`;
3639
case "html":
3740
return `.text().then((text) => html({raw: [text]}))`;
@@ -40,6 +43,7 @@ export function getInterpreterMethod(format: Cell["format"]): string {
4043
case "jpeg":
4144
case "png":
4245
case "gif":
46+
case "svg":
4347
case "webp":
4448
return ".image()";
4549
case "csv":

src/lib/notebook.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export interface CellSpec {
6060
| "png"
6161
| "arrow"
6262
| "parquet"
63-
| "html";
63+
| "html"
64+
| "svg"
65+
| "xml";
6466
/** for SQL cells, the database to query; use var:<name> to refer to a variable */
6567
database?: string;
6668
/** for SQL cells, the oldest allowable age of the cached query result */

0 commit comments

Comments
 (0)