Skip to content

fix: Adds linebreak to prevent region tag from being stripped. #695

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willum070
Copy link
Collaborator

@willum070 willum070 commented Aug 11, 2025

I noticed that in a couple of the deckgl KML demos, the region tag was weirdly being stripped from only certain JS outputs. The process scripts for these only copy, they don't do any manipulation.

THE FIX: Adding a line break after the opening region tag in TS files seems to help; some of the TS code is being stripped (declare namespace deck {...), but this is actually expected since that is not applicable in JS. I suspect that the TS compiler simply stripped the region tag along with the adjacent TS because it assumed that it was a comment related to the code.

In the future it would probably be a good idea to just leave a newline after the opening region tag in TS files to avoid any such side effects. This should only happen if you're using code structures that are only applicable in TypeScript (e.g. anything that the TS compiler will strip from output JS).

Change-Id: I8dabf2932d5dab5b062f8ddb19c607d310c6565e

Change-Id: I8dabf2932d5dab5b062f8ddb19c607d310c6565e
@willum070 willum070 requested a review from anglarett August 11, 2025 18:38
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.

1 participant