Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new script/style behavior #347

Merged
merged 4 commits into from
Apr 2, 2022
Merged

Support new script/style behavior #347

merged 4 commits into from
Apr 2, 2022

Conversation

natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Apr 2, 2022

Changes

Testing

Tests updated

Docs

Covered by core PR

@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2022

🦋 Changeset detected

Latest commit: d0b7945

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/compiler Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@natemoo-re natemoo-re changed the title Implement RFC0016 Support new script/style behavior Apr 2, 2022
@@ -401,7 +401,7 @@ func render1(p *printer, n *Node, opts RenderOptions) {
p.print(`]`)
} else {
for _, a := range n.Attr {
if transform.IsImplictNodeMarker(a) {
if transform.IsImplictNodeMarker(a) || a.Key == "is:inline" {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This strips is:inline directives from the output

if hasTruthyAttr(n, "global") {
if hasTruthyAttr(n, "is:global") {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed support for global, just supporting is:global. Is that what we want? It's minimal to support both.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a migration warning for global, but still supporting both.

@FredKSchott
Copy link
Member

LGTM!

@natemoo-re natemoo-re merged commit c0da4fe into main Apr 2, 2022
@natemoo-re natemoo-re deleted the feat/rfc0016 branch April 2, 2022 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants