Skip to content

Commit

Permalink
docs and fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
novaugust committed Nov 25, 2024
1 parent 0e8485b commit 5b56613
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/style/comment_directives.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
# governing permissions and limitations under the License.

defmodule Styler.Style.CommentDirectives do
@moduledoc "TODO"
@moduledoc """
Leave a comment for Styler asking it to maintain code in a certain way.
`# styler:sort` maintains sorting of wordlists (by string comparison) and lists (string comparison of code representation)
"""

@behaviour Styler.Style

Expand Down Expand Up @@ -48,7 +52,7 @@ defmodule Styler.Style.CommentDirectives do
case Regex.run(~r|^\s+|, string) do
# oneliner like `~w|c a b|`
nil -> {"", " ", ""}
# multline like
# multiline like
# `"\n a\n list\n long\n of\n static\n values\n"`
# ^^^^ `prepend` ^^^^ `joiner` ^^ `append`
# note that joiner and prepend are the same in a multiline (unsure if this is always true)
Expand Down

0 comments on commit 5b56613

Please sign in to comment.