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

Teddy strips empty {} from script tags #623

Closed
kethinov opened this issue Aug 31, 2023 · 1 comment · Fixed by #646
Closed

Teddy strips empty {} from script tags #623

kethinov opened this issue Aug 31, 2023 · 1 comment · Fixed by #646
Assignees
Labels

Comments

@kethinov
Copy link
Member

<script>
  const obj = {}
</script>

Inappropriately parses down to:

<script>
  const obj = 
</script>

Adding comments is an effective workaround:

<script>
  const obj = { /* empty obj */ }
</script>
@kethinov kethinov added the bug label Aug 31, 2023
@kethinov kethinov self-assigned this Aug 31, 2023
@kethinov
Copy link
Member Author

Best solution is probably to disable parsing any text inside of script tags by default, but maybe add an off by default option to allow it so previous workflows that require this can still work.

kethinov added a commit to kethinov/teddy that referenced this issue Jan 3, 2024
@kethinov kethinov mentioned this issue Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant