Page MenuHomeSealhub

markdown.test.ts
No OneTemporary

markdown.test.ts

import { FileManager } from "@sealcode/file-manager";
import { makeSimpleEnglishJDDContext } from "./jdd-context.js";
import assert from "assert";
describe("markdown", () => {
it("does not insert soft hyphens into links", async () => {
const { render_markdown, language } = makeSimpleEnglishJDDContext({
file_manager: new FileManager("/tmp", "/uploaded_files"),
});
const markdown = `some freeform text with multiple words and [a link with description](/multiple-segments/)`;
const html = await render_markdown(language, markdown);
assert.strictEqual(
html,
`<p>some freeform text with mul­ti­ple words and <a href="/multiple-segments/">a&nbsp;link with de­scrip­tion</a></p>\n`
);
});
});

File Metadata

Mime Type
text/html
Expires
Thu, Jul 3, 03:08 (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
742543
Default Alt Text
markdown.test.ts (718 B)

Event Timeline