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

Docstrings have their initial indent removed #2300

Closed
cursive-ide opened this issue Jan 17, 2020 · 0 comments
Closed

Docstrings have their initial indent removed #2300

cursive-ide opened this issue Jan 17, 2020 · 0 comments
Labels
bug Marks issues describing bugs released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@cursive-ide
Copy link
Owner

Docstrings currently have the initial indent of the line trimmed off. This is to handle the fact that all lines of docstrings except the first frequently have an indent from the position of the docstring itself in the source. For example:

(defn foo
  "Docstring here.
   And here."
  [x]
  ...)

Here, the second line has 3 spaces at the start of the line. However sometimes docstrings use additional indents to increase readability:

Screenshot from 2020-01-15 09-05-23

A good algorithm for dealing with this would be to check all the lines excluding the first, find the minimum indent of all those lines and then apply that to all of them.

@cursive-ide cursive-ide added this to the 1.9.1 milestone Jan 17, 2020
@cursive-ide cursive-ide modified the milestones: 1.9.1, 1.9.1-eap2 Jan 18, 2020
@cursive-ide cursive-ide added the bug Marks issues describing bugs label Sep 22, 2020
@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Marks issues describing bugs released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

1 participant