Doraku / DefaultDocumentation

Create a simple markdown documentation from the Visual Studio xml one.
MIT No Attribution
157 stars 26 forks source link

Is there a way to eliminate single-line breaks from doc comments? #120

Closed madelson closed 2 years ago

madelson commented 2 years ago

When writing C# doc comments, I manually wrap text to keep lines from getting too long (e.g. this file). However, this wrapping is preserved in the output markdown files, which looks a bit awkward.

Any thoughts on how to improve the formatting? Ideally for me the tool would retain paragraph breaks but not retain line breaks except in <code> blocks.

Doraku commented 2 years ago

There's a setting just for that :) You can also locally change this settings in your xml elements by setting a ignorelinebreak attribute in your documentation <summary ignorelinebreak="true">

madelson commented 2 years ago

Perfect. I figured I was missing something. Updated doc looks great now. Any reason this isn't the default?

Doraku commented 2 years ago

Because I am lazy mainly haha, that's how I write my xml documentation even if I know it's not the proper way (as the intellisence display in visual ignores the line breaks), sorry ^^"

madelson commented 2 years ago

@Doraku haha ok. In that case would you be supportive of enabling this by default? My guess is that most people would want it, especially since as you say VS ignores these breaks anyway.

Doraku commented 2 years ago

Yeah even if it is a "breaking change" it shouldn't affect most people and it's better to be in line with how the intellisense behave.