praeclarum / FuGetGallery

An alternative web UI for browsing nuget packages
https://www.fuget.org
MIT License
683 stars 121 forks source link

NullReferenceException when encountering <see langword="xxx" /> #97

Closed thoemmi closed 4 years ago

thoemmi commented 4 years ago

Previously the code to read XmlDoc expected see elements to have a cref attribute. However, in case of <see langword="xxx" />, this resulted in a NullReferenceException.

This PR fixes this and returns the correct langword as text element.

bgrainger commented 4 years ago

Do you have an example URL where this occurs?

thoemmi commented 4 years ago

I've noticed this issue when browsing my own library TinyLittleMvvm at fuget.org. E.g. have look at this URL: https://www.fuget.org/packages/TinyLittleMvvm/2.0.0-unstable0040/lib/netcoreapp3.0/TinyLittleMvvm.dll/TinyLittleMvvm/AsyncRelayCommand

Here's what it looks like currently: image You see, no input from XmlDoc at all.

After my fix it displays the expected documentation: image

praeclarum commented 4 years ago

I never knew about langword, thanks!