fix: Adds linebreak to prevent region tag from being stripped. #695
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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