geaz / sharpDox

A c# documentation tool (Discontinued)
http://sharpdox.de
MIT License
164 stars 37 forks source link

Remove prefixed spaces / tabs after a <para /> block #89

Closed GeertvanHorrik closed 7 years ago

GeertvanHorrik commented 7 years ago

This can be very tricky, but here is my use-case:

This doc:

        /// <summary>
        /// Returns a <see cref="string"/> that represents the type name of the instance.
        /// <para />
        /// If the <paramref name="instance"/> is <c>null</c>, this method will return "null". This
        /// method is great when the value of a property must be logged.
        /// </summary>
        /// <param name="instance">The instance.</param>
        /// <returns>A <see cref="string"/> that represents the type of the instance.</returns>
        public static string ToTypeString(object instance)

Gets converted to:

Returns a [String](#) that represents the full type name of the instance.

    If the instance is `null`, this method will return "null". This
    method is great when the value of a property must be logged.

As you can see, the text after a <para /> block somehow indented. Would you accept a PR that removes this indentation?

GeertvanHorrik commented 7 years ago

This text:

"\r\n Argument validator class to help validating arguments that are passed into a method.\r\n "

will now be converted to:

"Argument validator class to help validating arguments that are passed into a method."

A more complex example:

"\r\n Use this enum to provide a valid reason for excluding coverage. Expand this enum \r\n if you encounter a new type of reason. \r\n "

will become:

"Use this enum to provide a valid reason for excluding coverage. Expand this enum if you encounter a new type of reason."

If you agree, I will create the PR.

GeertvanHorrik commented 7 years ago

As you can see here, it's now generating correctly formatted documentation, even when the source docs contain a lot of "\r\n" or indents.

http://docs.catelproject.com/vnext/reference/Catel.Core/Catel/CatelEnvironment/

geaz commented 7 years ago

This behavior seems like a bug. A PR would be nice 👍