chore: publish from main

This commit is contained in:
github-actions[bot]
2026-07-30 04:36:20 +00:00
parent 7a4a7683f5
commit 6212c7a01b
8 changed files with 651 additions and 23 deletions
+25
View File
@@ -0,0 +1,25 @@
import assert from "node:assert/strict";
import { test } from "node:test";
import { inlineCode } from "./markdown.mjs";
test("inlineCode wraps plain values in a single-backtick code span", () => {
assert.equal(inlineCode("plain value"), "`plain value`");
});
test("inlineCode uses a fence longer than the longest backtick run", () => {
assert.equal(inlineCode("a `` b"), "```a `` b```");
});
test("inlineCode pads values starting or ending with a backtick", () => {
assert.equal(inlineCode("`leading"), "`` `leading ``");
assert.equal(inlineCode("trailing`"), "`` trailing` ``");
});
test("inlineCode collapses whitespace and pads empty values", () => {
assert.equal(inlineCode("a\n\t b"), "`a b`");
assert.equal(inlineCode(" \n\t "), "` `");
});
test("inlineCode truncates values to 80 characters", () => {
assert.equal(inlineCode("x".repeat(81)), `\`${"x".repeat(77)}...\``);
});