Skip to content

Commit

Permalink
Merge pull request #170 from tfiedlerdejanze/tf-fix-typos
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
novaugust authored May 21, 2024
2 parents 58d131c + 3e8813e commit 9179e74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/style.ex
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ defmodule Styler.Style do

@doc """
"Fixes" the line numbers of nodes who have had their orders changed via sorting or other methods.
This "fix" siply ensures that comments don't get wrecked as part of us moving AST nodes willy-nilly.
This "fix" simply ensures that comments don't get wrecked as part of us moving AST nodes willy-nilly.
The fix is rather naive, and simply enforces the following property on the code:
A given node must have a line number less than the following node.
Expand Down
4 changes: 2 additions & 2 deletions lib/style/module_directives.ex
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ defmodule Styler.Style.ModuleDirectives do

if Enum.any?(liftable) do
# This is a silly hack that helps comments stay put.
# the `cap_line` algo was designed to handle high-line stuff moving up into low line territory, so we set our
# new node to have an abritrarily high line annnnd comments behave! i think.
# The `cap_line` algo was designed to handle high-line stuff moving up into low line territory, so we set our
# new node to have an arbitrarily high line annnnd comments behave! i think.
m = [line: 999_999]

aliases =
Expand Down
4 changes: 2 additions & 2 deletions test/style/pipes_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ defmodule Styler.Style.PipesTest do
end

describe "simple rewrites" do
test "rewrites anon fun def ahd invoke to use then" do
test "rewrites anonymous function invocations to use then" do
assert_style("a |> (& &1).()", "then(a, & &1)")
assert_style("a |> (& {&1, &2}).(b)", "(&{&1, &2}).(a, b)")
assert_style("a |> (& &1).() |> c", "a |> then(& &1) |> c()")
Expand Down Expand Up @@ -700,7 +700,7 @@ defmodule Styler.Style.PipesTest do
end

describe "comments" do
test "unpiping doens't move comment in anon fun" do
test "unpiping doesn't move comment in anonymous function" do
assert_style """
aliased =
aliases
Expand Down

0 comments on commit 9179e74

Please sign in to comment.