code
Turn the provided string template into Children by replacing literal line
breaks with hardlines and automatically indenting indented content. Similar
in spirit to the <code>
element in HTML.
import { code } from "@alloy-js/core";
function code(template: TemplateStringsArray, ...substitutions: Children[]): Children;
Parameters
template |
|
substitutions |
|
Returns
Children
See also
- text for a similar function which treats whitespace similar to JSX template bodies.