[ci] yarn format
This commit is contained in:
parent
005751a920
commit
d97d61ec45
2 changed files with 3 additions and 6 deletions
|
@ -1,3 +1,3 @@
|
||||||
const entities = { '"': 'quot', '&': 'amp', '\'': 'apos', '<': 'lt', '>': 'gt' } as const
|
const entities = { '"': 'quot', '&': 'amp', "'": 'apos', '<': 'lt', '>': 'gt' } as const;
|
||||||
|
|
||||||
export const escapeHTML = (string: any) => string.replace(/["'&<>]/g, (char: keyof typeof entities) => '&' + entities[char] + ';')
|
export const escapeHTML = (string: any) => string.replace(/["'&<>]/g, (char: keyof typeof entities) => '&' + entities[char] + ';');
|
||||||
|
|
|
@ -309,10 +309,7 @@ export function createAstro(filePathname: string, site: string, projectRootStr:
|
||||||
|
|
||||||
const toAttributeString = (value: any) => String(value).replace(/&/g, '&').replace(/"/g, '"');
|
const toAttributeString = (value: any) => String(value).replace(/&/g, '&').replace(/"/g, '"');
|
||||||
|
|
||||||
const STATIC_DIRECTIVES = new Set([
|
const STATIC_DIRECTIVES = new Set(['set:html', 'set:text']);
|
||||||
'set:html',
|
|
||||||
'set:text'
|
|
||||||
])
|
|
||||||
|
|
||||||
// A helper used to turn expressions into attribute key/value
|
// A helper used to turn expressions into attribute key/value
|
||||||
export function addAttribute(value: any, key: string) {
|
export function addAttribute(value: any, key: string) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue