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 searching for quotes with indentations #79

Merged
merged 5 commits into from
Sep 10, 2022

Conversation

eagr
Copy link
Contributor

@eagr eagr commented Sep 8, 2022

Issue #, if available:
Fixes #77
Description of changes:
Trim quotes line by line to allow arbitrary whitespace at line start for formatting.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eagr eagr requested a review from a team as a code owner September 8, 2022 08:51
@eagr eagr changed the title effectively ignore whitespace in quotes when matching Fix searching for quotes with indentations Sep 8, 2022
@camshaft
Copy link
Member

camshaft commented Sep 8, 2022

Could you extract this logic into a separate function and write a unit test or two showing that it works how we want it to? Also you missed the Spec impl above.

@eagr
Copy link
Contributor Author

eagr commented Sep 9, 2022

Also you missed the Spec impl above.

Yeah, I noticed that. Considering the Spec type quotes were all generated and the #77 case wouldn't occur, I figured it might not need the fix.

src/source.rs Outdated Show resolved Hide resolved
Co-authored-by: Cameron Bytheway <bytheway.cameron@gmail.com>
camshaft
camshaft previously approved these changes Sep 9, 2022
@camshaft camshaft merged commit 65835f7 into awslabs:main Sep 10, 2022
@camshaft camshaft mentioned this pull request Nov 16, 2022
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.

Unexpected trimming to the spec
2 participants