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

fix(snippets): trim leading whitespace when extracting snippets #449

Merged
merged 3 commits into from
Mar 19, 2020

Conversation

chingor13
Copy link
Contributor

When parsing snippets from the source file, trim leading spaces while maintaining extra indentation. This implementation finds the minimum indentation, ignoring empty lines and removes that many spaces from each line.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 18, 2020
@chingor13
Copy link
Contributor Author

This will prevent PRs like googleapis/java-automl#132

@chingor13
Copy link
Contributor Author

@bcoe Is this going to cause an issue with your nodejs snippet usage?

@chingor13 chingor13 requested a review from bcoe March 18, 2020 23:00
@chingor13 chingor13 merged commit bcad3e0 into googleapis:master Mar 19, 2020
@chingor13 chingor13 deleted the trim-snippets branch March 19, 2020 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants