Skip to content

Off-by-one error in indentation? #10

Open

Description

@seancorfield

The default indentation seems off-by-one: for f I accepted default indentation and the docstring does not align; for g I typed an extra space after each newline and the docstring lines up.

(!2027)-> clojure -M:repl
Clojure 1.13.0-alpha11
JVM 27.0.1.0.2+1
nREPL server started on port 36921
connected to nREPL on 36921
 user ▓▒░                                                                                                       ░▒▓ 16:54:46 ▓▒░
❯ (defn f
   "Multi-line
   docstring"
   [a b])
#'user/f

 user ▓▒░ ✓ ▓▒░ 9ms ▓▒░ 85M/4G ▓▒░                                                                              ░▒▓ 16:55:10 ▓▒░
❯ (doc f)
-------------------------
user/f
([a b])
  Multi-line
 docstring
nil

 user ▓▒░ ✓ ▓▒░ 7ms ▓▒░ 86M/4G ▓▒░                                                                              ░▒▓ 16:55:13 ▓▒░
❯ (defn g
    "Multi-line
    docstring"
    [a b])
#'user/g

 user ▓▒░ ✓ ▓▒░ 2ms ▓▒░ 86M/4G ▓▒░                                                                              ░▒▓ 16:56:20 ▓▒░
❯ (doc g)
-------------------------
user/g
([a b])
  Multi-line
  docstring
nil

 user ▓▒░ ✓ ▓▒░ 3ms ▓▒░ 87M/4G ▓▒░                                                                              ░▒▓ 16:56:25 ▓▒░
❯

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions