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

Formatter: consider consecutive macro literals when subformatting #8034

Merged
merged 7 commits into from
Aug 5, 2019
Prev Previous commit
fixup! Formatter: consider nested macros when subformatting
  • Loading branch information
asterite committed Aug 3, 2019
commit e2820d4451e9778824f49e01f6b4ea506edaa3a3
4 changes: 2 additions & 2 deletions src/compiler/crystal/tools/formatter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2034,8 +2034,8 @@ module Crystal
# If we are formatting macro contents, if there are nested macro
# control structures they are definitely escaped with `\`,
# because otherwise we wouln't be able to format the contents.
# So here we appent those slashes. In theory the nesting can be
# very deep but it's usually just one nesting.
# So here we append those slashes. In theory the nesting can be
# very deep but it's usually just one level.
private def write_macro_slashes
@subformat_nesting.times do
write "\\"
Expand Down