fsprojects / FSharp.Formatting

F# tools for generating documentation (Markdown processor and F# code formatter)
https://fsprojects.github.io/FSharp.Formatting/
Other
462 stars 155 forks source link

Fix arguments naming and escape operator name in usageHtml #765

Closed DedSec256 closed 1 year ago

DedSec256 commented 1 year ago

Some operator names are displayed incorrectly due to missing escaping; also, the argument names are duplicated. This PR fixes that.

Before: https://github.com/dotnet/fsharp/blob/0063f20f6cd49d016d5d234b9c1b7df00c2e9a4d/src/FSharp.Core/Nullable.fsi#L173 image image

After: image

cc @BoundedChenn31

dsyme commented 1 year ago

Looks good. Will you add tests? I'm OK with taking as is.

DedSec256 commented 1 year ago

@dsyme, yes, we would like to add some tests for it in the near future.

DedSec256 commented 1 year ago

@dsyme, we think it's ready

dsyme commented 1 year ago

You probably want to exclude these from code formatting, or else format them

tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fsi needs formatting
tests/FSharp.ApiDocs.Tests/files/FsLib1/OperatorsWithFsi.fs needs formatting
DedSec256 commented 1 year ago

@dsyme, it could be merged I think (:

dsyme commented 1 year ago

Thanks!