Code
import { Code } from "jsr:@ende/markdown";interface
interface CodeA fenced or indented code block.
Example: Usage
import type { Code } from "@ende/markdown/types";
import { assertEquals } from "@ende/assert";
const node: Code = { type: "code", lang: "ts", meta: null, value: "const x = 1;" };
assertEquals(node.lang, "ts");
Properties
type
type: "code"Node type.
lang
lang: string | nullThe first word of the info string, or null if there is none.
meta
meta: string | nullThe rest of the info string after the first word, or null if there is none.
value
value: stringThe code, without the final line ending.