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

[M2R] :code: should always be preceded by \ (backslash space) #2967

Closed
lmazuel opened this issue Dec 14, 2024 · 2 comments · Fixed by microsoft/typespec#5373
Closed

[M2R] :code: should always be preceded by \ (backslash space) #2967

lmazuel opened this issue Dec 14, 2024 · 2 comments · Fixed by microsoft/typespec#5373
Assignees

Comments

@lmazuel
Copy link
Member

lmazuel commented Dec 14, 2024

See this link for why:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#gotchas

In practice, see this Markdown:
https://github.com/Azure/azure-rest-api-specs/blob/495c99982b1231e229c9f6309602d0f10d35730d/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/preview/2020-09-30/gallery.json#L546C13-L546C273

"description": "Format: <MajorVersion>.<MinorVersion>.<Patch>"

We get today in RST:

:code:`<MajorVersion>`.:code:`<MinorVersion>`.:code:`<Patch>`

https://github.com/Azure/azure-sdk-for-python/blob/f9e8d676f6cc8b75eb1b1e31455bc3057ad5a1c1/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/operations/_operations.py#L8121C10-L8121C71

Note that this is incorrect and a M2R bug, this should have been:

:code:`<MajorVersion>`.\ :code:`<MinorVersion>`.\ :code:`<Patch>`

We could also try to group any non spaced string that includes :code:, but it's unclear if that heuristic is true. The following is technically not accurate to the original description:

:code:`<MajorVersion>.<MinorVersion>.<Patch>`
@lmazuel
Copy link
Member Author

lmazuel commented Dec 14, 2024

I tried to do a simple PR, that needs someone to take over with unit tests, and confirm compute would be correct :)
microsoft/typespec#5373

github-merge-queue bot pushed a commit to microsoft/typespec that referenced this issue Dec 17, 2024
archerzz pushed a commit to archerzz/typespec that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants