red-gate / XmlDoc2CmdletDoc

Create cmdlet XML help files from XML doc comments
Other
63 stars 24 forks source link

String default values generate an array of characters instead of the string value #39

Closed ghchuco closed 6 years ago

ghchuco commented 6 years ago

Currently a property that has a default value of "All Computers" generates:

<dev:defaultValue>A, l, l,  , C, o, m, p, u, t, e, r, s</dev:defaultValue>

If you change line #278 in CommentReaderExtensions.cs from:

if (defaultValue is IEnumerable enumerable)

to

if (defaultValue is IEnumerable enumerable && !(defaultValue is string))

then it it will generate:

<dev:defaultValue>All Computers</dev:defaultValue>
ChrisLambrou commented 6 years ago

Many thanks for your bug report. I've released the fix in version 0.2.9.

ghchuco commented 6 years ago

Kudos on the fast response!