diff --git a/scripts/js/lib/api/htmlToMd.test.ts b/scripts/js/lib/api/htmlToMd.test.ts
index 68c6cf395e9..96147784198 100644
--- a/scripts/js/lib/api/htmlToMd.test.ts
+++ b/scripts/js/lib/api/htmlToMd.test.ts
@@ -100,10 +100,10 @@ Can be either (1) a dictionary mapping XX angle values to fidelity at that angle
// Transform code blocks
// ------------------------------------------------------------------
-test("translate codeblocks to code fences with lang python", async () => {
+test("translate codeblocks to code fences with default lang python", async () => {
expect(
await toMd(`
-
+
QiskitRuntimeService.backends(
filters=lambda b: b.max_shots > 50000)
@@ -122,6 +122,28 @@ QiskitRuntimeService.backends(
`);
});
+test("translate codeblocks to code fences with lang c", async () => {
+ expect(
+ await toMd(`
+
+
+
QiskitRuntimeService.backends(
+ filters=lambda b: b.max_shots > 50000)
+QiskitRuntimeService.backends(
+ filters=lambda x: ("rz" in x.basis_gates )
+
+
+
+ `),
+ ).toEqual(`\`\`\`c
+QiskitRuntimeService.backends(
+ filters=lambda b: b.max_shots > 50000)
+QiskitRuntimeService.backends(
+ filters=lambda x: ("rz" in x.basis_gates )
+\`\`\`
+`);
+});
+
// ------------------------------------------------------------------
// Transform methods and attributes
// ------------------------------------------------------------------