Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters docs with newline char are not generated correctly #4377

Closed
JoshLove-msft opened this issue Sep 9, 2024 · 1 comment · Fixed by #5214
Closed

Parameters docs with newline char are not generated correctly #4377

JoshLove-msft opened this issue Sep 9, 2024 · 1 comment · Fixed by #5214
Assignees
Labels
1_0_E2E emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Comments

@JoshLove-msft
Copy link
Contributor

JoshLove-msft commented Sep 9, 2024

For parameters that have descriptions containing a newline char, subsequent lines are missing the leading ///:

image

@JoshLove-msft JoshLove-msft added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Sep 9, 2024
@JoshLove-msft JoshLove-msft changed the title Multiline parameter docs are not generated correctly Parameters docs with newline char are not generated correctly Sep 10, 2024
@nisha-bhatia
Copy link
Contributor

nisha-bhatia commented Nov 26, 2024

Ideally, we would like to update the EscapeLines method here to take \n into account. Unfortunately, this is proving to be difficult. We cannot use .ToString(). Updating the code as so:
Image
We could have multiple arguments in each \n segment, leading to a recursive solution. We can also have an Object in a FormattableString? We can't call .ToString() on every object because this method might be overloaded.

I believe it's easier to update the WriteLines methods to just print "\" whenever we see a line break, but then we are manipulating the data in multiple places.

@ArcturusZhang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1_0_E2E emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants