diff --git a/tests/docs/convert/issue-12042.ipynb b/tests/docs/convert/issue-12042.ipynb new file mode 100644 index 0000000000..9766e73723 --- /dev/null +++ b/tests/docs/convert/issue-12042.ipynb @@ -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 +} \ No newline at end of file diff --git a/tests/smoke/convert/convert-issue-12042.test.ts b/tests/smoke/convert/convert-issue-12042.test.ts new file mode 100644 index 0000000000..56e0a610d0 --- /dev/null +++ b/tests/smoke/convert/convert-issue-12042.test.ts @@ -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/backticks.qmd")) { + Deno.removeSync("docs/convert/backticks.qmd"); + } + } + }, + ); +})();