summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bluwy <bluwy@users.noreply.github.com> 2023-07-03 08:01:57 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-07-03 08:01:57 +0000
commit3df71fd34fe2f50d81776e5ccdb7a340a4b2ca41 (patch)
treec367e8532ec37f0e375ddf5582b4deae51dc2447
parentcdc28326cf21f305924363e9c8c02ce54b6ff895 (diff)
downloadastro-3df71fd34fe2f50d81776e5ccdb7a340a4b2ca41.tar.gz
astro-3df71fd34fe2f50d81776e5ccdb7a340a4b2ca41.tar.zst
astro-3df71fd34fe2f50d81776e5ccdb7a340a4b2ca41.zip
[ci] format
Diffstat (limited to '')
-rw-r--r--packages/astro/src/runtime/server/render/util.ts4
-rw-r--r--packages/astro/test/astro-directives.test.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/packages/astro/src/runtime/server/render/util.ts b/packages/astro/src/runtime/server/render/util.ts
index 6c5080367..817ca5c32 100644
--- a/packages/astro/src/runtime/server/render/util.ts
+++ b/packages/astro/src/runtime/server/render/util.ts
@@ -92,7 +92,9 @@ Make sure to use the static attribute syntax (\`${key}={value}\`) instead of the
// support object styles for better JSX compat
if (key === 'style' && !(value instanceof HTMLString)) {
if (Array.isArray(value) && value.length === 2) {
- return markHTMLString(` ${key}="${toAttributeString(`${toStyleString(value[0])};${value[1]}`, shouldEscape)}"`);
+ return markHTMLString(
+ ` ${key}="${toAttributeString(`${toStyleString(value[0])};${value[1]}`, shouldEscape)}"`
+ );
}
if (typeof value === 'object') {
return markHTMLString(` ${key}="${toAttributeString(toStyleString(value), shouldEscape)}"`);
diff --git a/packages/astro/test/astro-directives.test.js b/packages/astro/test/astro-directives.test.js
index 9b90d59bf..2a86e4ba2 100644
--- a/packages/astro/test/astro-directives.test.js
+++ b/packages/astro/test/astro-directives.test.js
@@ -61,7 +61,9 @@ describe('Directives', async () => {
expect($('style')).to.have.lengthOf(0);
// Inject style attribute on top-level element in page
- expect($('#compound-style').attr('style').toString()).to.include('color:var(--fg);--fg: black;--bg: white;');
+ expect($('#compound-style').attr('style').toString()).to.include(
+ 'color:var(--fg);--fg: black;--bg: white;'
+ );
});
it('set:html', async () => {