-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/md-ampersands
- Loading branch information
Showing
28 changed files
with
455 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@astrojs/markdown-remark': patch | ||
--- | ||
|
||
Fix: HTML comments in markdown code blocks should not be wrapped in JS comments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Add component hydration in Markdown E2E tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/astro/e2e/fixtures/preact-component/src/components/JSXComponent.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { h } from 'preact'; | ||
|
||
export default function({ id }) { | ||
return <div id={id}>Preact client:only component</div> | ||
return <div id={id}>Framework client:only component</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/astro/e2e/fixtures/preact-component/src/pages/markdown.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
setup: | | ||
import Counter from '../components/Counter.jsx'; | ||
import PreactComponent from '../components/JSXComponent.jsx'; | ||
const someProps = { | ||
count: 0, | ||
}; | ||
--- | ||
|
||
<Counter id="server-only" {...someProps}> | ||
# Hello, server! | ||
</Counter> | ||
|
||
<Counter id="client-idle" {...someProps} client:idle> | ||
# Hello, client:idle! | ||
</Counter> | ||
|
||
<Counter id="client-load" {...someProps} client:load> | ||
# Hello, client:load! | ||
</Counter> | ||
|
||
<Counter id="client-visible" {...someProps} client:visible> | ||
# Hello, client:visible! | ||
</Counter> | ||
|
||
<Counter id="client-media" {...someProps} client:media="(max-width: 50em)"> | ||
# Hello, client:media! | ||
</Counter> | ||
|
||
<PreactComponent id="client-only" client:only="preact" /> |
2 changes: 1 addition & 1 deletion
2
packages/astro/e2e/fixtures/react-component/src/components/JSXComponent.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React from 'react'; | ||
|
||
export default function({ id }) { | ||
return <div id={id}>React client:only component</div> | ||
return <div id={id}>Framework client:only component</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/astro/e2e/fixtures/react-component/src/pages/markdown.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
setup: | | ||
import Counter from '../components/Counter.jsx'; | ||
import ReactComponent from '../components/JSXComponent.jsx'; | ||
const someProps = { | ||
count: 0, | ||
}; | ||
--- | ||
|
||
<Counter id="server-only" {...someProps}> | ||
# Hello, server! | ||
</Counter> | ||
|
||
<Counter id="client-idle" {...someProps} client:idle> | ||
# Hello, client:idle! | ||
</Counter> | ||
|
||
<Counter id="client-load" {...someProps} client:load> | ||
# Hello, client:load! | ||
</Counter> | ||
|
||
<Counter id="client-visible" {...someProps} client:visible> | ||
# Hello, client:visible! | ||
</Counter> | ||
|
||
<Counter id="client-media" {...someProps} client:media="(max-width: 50em)"> | ||
# Hello, client:media! | ||
</Counter> | ||
|
||
<ReactComponent id="client-only" client:only="react" /> |
5 changes: 5 additions & 0 deletions
5
packages/astro/e2e/fixtures/solid-component/src/components/SolidComponent.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default function SolidComponent({ id }) { | ||
return ( | ||
<div id={id}>Framework client:only component</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/astro/e2e/fixtures/solid-component/src/pages/markdown.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
setup: | | ||
import Counter from '../components/Counter.jsx'; | ||
import SolidComponent from '../components/SolidComponent.jsx'; | ||
const someProps = { | ||
count: 0, | ||
}; | ||
--- | ||
|
||
<Counter id="server-only" {...someProps}> | ||
# Hello, server! | ||
</Counter> | ||
|
||
<Counter id="client-idle" {...someProps} client:idle> | ||
# Hello, client:idle! | ||
</Counter> | ||
|
||
<Counter id="client-load" {...someProps} client:load> | ||
# Hello, client:load! | ||
</Counter> | ||
|
||
<Counter id="client-visible" {...someProps} client:visible> | ||
# Hello, client:visible! | ||
</Counter> | ||
|
||
<Counter id="client-media" {...someProps} client:media="(max-width: 50em)"> | ||
# Hello, client:media! | ||
</Counter> | ||
|
||
<SolidComponent id="client-only" client:only="solid" /> |
3 changes: 1 addition & 2 deletions
3
packages/astro/e2e/fixtures/svelte-component/src/components/Counter.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/astro/e2e/fixtures/svelte-component/src/components/SvelteComponent.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script lang="ts"> | ||
export let id: string; | ||
</script> | ||
|
||
<div {id}>Framework client:only component</div> |
23 changes: 13 additions & 10 deletions
23
packages/astro/e2e/fixtures/svelte-component/src/pages/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
--- | ||
import Counter from '../components/Counter.svelte'; | ||
import SvelteComponent from '../components/SvelteComponent.svelte'; | ||
const someProps = { | ||
count: 0, | ||
}; | ||
--- | ||
|
||
<html> | ||
<head> | ||
<!-- Head Stuff --> | ||
</head> | ||
<body> | ||
<Counter id="server-only"> | ||
<head> | ||
<!-- Head Stuff --> | ||
</head> | ||
<body> | ||
<Counter id="server-only" {...someProps}> | ||
<h1>Hello, server!</h1> | ||
</Counter> | ||
|
||
<Counter id="client-idle" client:idle> | ||
<Counter id="client-idle" {...someProps} client:idle> | ||
<h1>Hello, client:idle!</h1> | ||
</Counter> | ||
|
||
<Counter id="client-load" client:load> | ||
<Counter id="client-load" {...someProps} client:load> | ||
<h1>Hello, client:load!</h1> | ||
</Counter> | ||
|
||
<Counter id="client-visible" client:visible> | ||
<Counter id="client-visible" {...someProps} client:visible> | ||
<h1>Hello, client:visible!</h1> | ||
</Counter> | ||
|
||
<Counter id="client-media" client:media="(max-width: 50rem)"> | ||
<Counter id="client-media" {...someProps} client:media="(max-width: 50em)"> | ||
<h1>Hello, client:media!</h1> | ||
</Counter> | ||
</body> | ||
|
||
<SvelteComponent id="client-only" client:only="svelte" /> | ||
</body> | ||
</html> |
31 changes: 31 additions & 0 deletions
31
packages/astro/e2e/fixtures/svelte-component/src/pages/markdown.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
setup: | | ||
import Counter from '../components/Counter.svelte'; | ||
import SvelteComponent from '../components/SvelteComponent.svelte'; | ||
const someProps = { | ||
count: 0, | ||
}; | ||
--- | ||
|
||
<Counter id="server-only" {...someProps}> | ||
# Hello, server! | ||
</Counter> | ||
|
||
<Counter id="client-idle" {...someProps} client:idle> | ||
# Hello, client:idle! | ||
</Counter> | ||
|
||
<Counter id="client-load" {...someProps} client:load> | ||
# Hello, client:load! | ||
</Counter> | ||
|
||
<Counter id="client-visible" {...someProps} client:visible> | ||
# Hello, client:visible! | ||
</Counter> | ||
|
||
<Counter id="client-media" {...someProps} client:media="(max-width: 50em)"> | ||
# Hello, client:media! | ||
</Counter> | ||
|
||
<SvelteComponent id="client-only" client:only="svelte" /> |
Oops, something went wrong.