wip: add jsx-runtime fix
This commit is contained in:
parent
deecec27bd
commit
07f4528f44
1 changed files with 2 additions and 0 deletions
|
@ -542,6 +542,8 @@ export function createAstro(
|
|||
const toAttributeString = (value: any, shouldEscape = true) =>
|
||||
shouldEscape ? String(value).replace(/&/g, '&').replace(/"/g, '"') : value;
|
||||
|
||||
const kebab = (k: string) => k.toLowerCase() === k ? k : k.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`);
|
||||
const toStyleString = (obj: Record<string, any>) => Object.entries(obj).map(([k, v]) => `${kebab(k)}:${v}`).join(';')
|
||||
const STATIC_DIRECTIVES = new Set(['set:html', 'set:text']);
|
||||
|
||||
// A helper used to turn expressions into attribute key/value
|
||||
|
|
Loading…
Reference in a new issue