-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12223 from quarto-dev/bugfix/issue-12042
convert - preserve markdown after yaml in raw cells
- Loading branch information
Showing
4 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"---\n", | ||
"title: My Document\n", | ||
"format: html\n", | ||
"jupyter: python3\n", | ||
"keep-ipynb: true\n", | ||
"---\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"## Introduction\n", | ||
"\n", | ||
"Here I place some text." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"name": "python3", | ||
"language": "python", | ||
"display_name": "Python 3 (ipykernel)", | ||
"path": "/Users/cscheid/virtualenvs/homebrew-python3/share/jupyter/kernels/python3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* convert-backticks.test.ts | ||
* | ||
* Copyright (C) 2020-2024 Posit Software, PBC | ||
* | ||
*/ | ||
import { existsSync } from "../../../src/deno_ral/fs.ts"; | ||
import { | ||
ExecuteOutput, | ||
testQuartoCmd, | ||
} from "../../test.ts"; | ||
import { assert } from "testing/asserts"; | ||
|
||
(() => { | ||
const input = "docs/convert/backticks.ipynb"; | ||
testQuartoCmd( | ||
"convert", | ||
["docs/convert/issue-12042.ipynb"], | ||
[ | ||
{ | ||
name: "convert-markdown-after-yaml", | ||
verify: async (outputs: ExecuteOutput[]) => { | ||
const txt = Deno.readTextFileSync("docs/convert/issue-12042.qmd"); | ||
assert(txt.includes("Here I place some text."), "Markdown text not found in output"); | ||
} | ||
} | ||
], | ||
{ | ||
teardown: async () => { | ||
if (existsSync("docs/convert/issue-12042.qmd")) { | ||
Deno.removeSync("docs/convert/issue-12042.qmd"); | ||
} | ||
} | ||
}, | ||
); | ||
})(); |