Skip to content

Commit

Permalink
wip: add jsx-runtime fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed Jul 21, 2022
1 parent deecec2 commit 07f4528
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/astro/src/runtime/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 07f4528

Please sign in to comment.