-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Markdoc] Fix global asset bleed (#6758)
* wip: propagatedAssets flag per-component * Propagate in TreeNode * fix: remove unused inject comment * feat: make asset propagation an integration opt-in * fix: remove crawlGraph stopper * wip: logs to understand what's happening * SSR mdoc files in dev * feat: add astroPropagatedAssets flag with vite * chore: remove console logs * chore: cleanup hasContentFlag * fix: set handlePropagation default for legacy integrations * chore: changeset * temp: silence acorn type error * chore: revert pnpm-lock changes * fix: check correct flag * We need to handle propagation on markdown because of layouts * Remove use of renderStyleElement * Fix heading tests * Fix merge conflict * typeof function * Switch the check * Add comment on injection detection regexp --------- Co-authored-by: Matthew Phillips <[email protected]>
- Loading branch information
1 parent
b41963b
commit f558a9e
Showing
16 changed files
with
290 additions
and
113 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,7 @@ | ||
--- | ||
'astro': patch | ||
'@astrojs/markdoc': patch | ||
'@astrojs/mdx': patch | ||
--- | ||
|
||
Improve style and script handling across content collection files. This addresses style bleed present in `@astrojs/markdoc` v0.1.0 |
This file was deleted.
Oops, something went wrong.
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
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,11 +1,13 @@ | ||
export const PROPAGATED_ASSET_FLAG = 'astroPropagatedAssets'; | ||
export const CONTENT_RENDER_FLAG = 'astroRenderContent'; | ||
export const CONTENT_FLAG = 'astroContentCollectionEntry'; | ||
export const DATA_FLAG = 'astroDataCollectionEntry'; | ||
export const CONTENT_FLAGS = [CONTENT_FLAG, DATA_FLAG, PROPAGATED_ASSET_FLAG] as const; | ||
|
||
export const VIRTUAL_MODULE_ID = 'astro:content'; | ||
export const LINKS_PLACEHOLDER = '@@ASTRO-LINKS@@'; | ||
export const STYLES_PLACEHOLDER = '@@ASTRO-STYLES@@'; | ||
export const SCRIPTS_PLACEHOLDER = '@@ASTRO-SCRIPTS@@'; | ||
|
||
export const CONTENT_FLAGS = [CONTENT_FLAG, CONTENT_RENDER_FLAG, DATA_FLAG, PROPAGATED_ASSET_FLAG] as const; | ||
|
||
export const CONTENT_TYPES_FILE = 'types.d.ts'; |
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
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
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
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
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
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
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
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
Oops, something went wrong.