codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.89k stars 356 forks source link

option to have the space (<see cref="" />) or not have the space (<see cref=""/>) before the closing /> #897

Open karolsykora opened 2 years ago

karolsykora commented 2 years ago

Environment

Description

Is there a config option where I can set the formatting feature to include or not include the space before the closing /> XML tag? This is causing lot of unnecessary code changes during the code review.

Steps to recreate

Currently I'm always having <see cref="" /> XML tags with space before the />. I would like to have the possibility to remove the space as follows: <see cref=""/>.

Current behavior

XML tag containing the space: <see cref="" />

Expected behavior

make it configurable to have XML tag not containing the space: <see cref=""/> or containing the space: <see cref="" />

codecadwallader commented 2 years ago

Thanks for asking the question. There is an option called "Add space inside self closing tags" under CodeMaid->Options->Formatting. Is that what you were looking to find?

karolsykora commented 2 years ago

yes, this is exactly what I wanted, but unfortunately it's not working 100% properly. I have web.config file, where is `

` and if the config switch you mentioned "Add space inside self closing tags" is ON, it's working fine, it's adding the space. But when the config switch if OFF, it's not working properly - if there is no space, it's added (this behavior is wrong, this should happen only when the config switch is ON) and if there is a space, it isn't removed, it's always there. What I'm missing is a way how to remove the space. Thanks.

codecadwallader commented 2 years ago

What I'm missing is a way how to remove the space.

Gotcha. I don't think it currently supports removing the space, only inserting it.