-
-
Notifications
You must be signed in to change notification settings - Fork 140
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 indentation for raw string newlines #625
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #625 +/- ##
=======================================
Coverage 77.36% 77.36%
=======================================
Files 22 22
Lines 7885 7887 +2
=======================================
+ Hits 6100 6102 +2
Misses 1368 1368
Partials 417 417 |
@@ -28,8 +28,6 @@ const ( | |||
type Encoder struct { | |||
writer io.Writer | |||
opts []EncodeOption | |||
indent int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Encoder previously had two fields, indent
and indentNum
, but indentNum
was not being used anywhere. Since the name indentNum
is used elsewhere, I migrated the functionality of the indent
field to the indentNum
field and removed the indent
field.
if e.indentSequence { | ||
e.column -= e.indentNum | ||
} | ||
}() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor refactoring to ensure the subtraction 🙏
Closes #292
Before submitting your PR, please confirm the following.