Off-by-one error in indentation?

オープン
#10 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
clojure
領域
cli

調査の方向性

Start by reproducing the reported indentation with the doc command in the Clojure CLI enhanced REPL, comparing the f and g examples. The issue does not name the implementation file or a test, so trace how doc formats multiline docstrings and look for related tests. Done when the default-indented example displays its docstring aligned as expected.

索引モデルが issue の本文から書いたものです。

説明

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 ▓▒░
❯
主要言語
Clojure
スター
45
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

clojure/clojure-cli.repl のほかの issue

clojure/clojure-cli.repl の issue をすべて見る

似ている issue

Clojure の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。