JuliaFormatter.jl icon indicating copy to clipboard operation
JuliaFormatter.jl copied to clipboard

Formatter Doesn't Add Line Breaks to Docstrings

Open ParadaCarleton opened this issue 4 years ago • 4 comments
trafficstars

As title says -- docstrings don't get line breaks.

ParadaCarleton avatar Jun 27 '21 14:06 ParadaCarleton

@ParadaCarleton can you post an example

domluna avatar Jun 27 '21 14:06 domluna

@ParadaCarleton can you post an example

image (This is after formatting.)

ParadaCarleton avatar Jun 27 '21 18:06 ParadaCarleton

oh you mean the text in the docstring. Yeah atm that's not done, but it could be. There may be Markdown edge cases where a link break causes an issue but I'm not sure

domluna avatar Jun 27 '21 19:06 domluna

if you meant the code in the docstring you could do that with kwarg format_docstrings = true

https://domluna.github.io/JuliaFormatter.jl/stable/api/#JuliaFormatter.format_text-Tuple{AbstractString}

domluna avatar Jun 27 '21 19:06 domluna