INNER CODE UNIT · TypeScript
fromHtml
kane50613/takumi · takumi-helpers/src/html/index.ts:14
export function fromHtml(html: string): FromHtmlResult {
const converted = fromStaticMarkup(html);
while (isWhitespaceOnlyText(converted.nodes[0])) {
converted.nodes.shift();
}
while (isWhitespaceOnlyText(converted.nodes.at(-1))) {
converted.nodes.pop();
}
return rootResult(converted);
}