Skip to content

[clang][doc] Don't escape _ in .rst files. #65277

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

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

mordante
Copy link
Member

@mordante mordante commented Sep 4, 2023

The current generated ClangCommandLineReference.rst unconditionally escapes underscores. This leads odd output on the website https://clang.llvm.org/docs/ClangCommandLineReference.html

For example

-fchar8_t, -fno-char8_t

Whether an underscore should be escaped depends on the state. Currently the escape routine doesn't keep track of the state and currently underscores are not used in places where they need to be escaped. Therefore remove the underscore from the list of escaped characters.

The current generated ClangCommandLineReference.rst unconditionally
escapes underscores. This leads odd output on the website
https://clang.llvm.org/docs/ClangCommandLineReference.html

For example

   -fchar8\_t, -fno-char8\_t

Whether an underscore should be escaped depends on the state. Currently
the escape routine doesn't keep track of the state and currently
underscores are not used in places where they need to be escaped.
Therefore remove the underscore from the list of escaped characters.
@mordante mordante requested a review from a team as a code owner September 4, 2023 17:09
Copy link
Collaborator

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mordante mordante merged commit c5cf4f7 into llvm:main Sep 5, 2023
@mordante mordante deleted the clang_option_doc_emitter branch September 5, 2023 15:54
avillega pushed a commit to avillega/llvm-project that referenced this pull request Sep 11, 2023
The current generated ClangCommandLineReference.rst unconditionally
escapes underscores. This leads odd output on the website
https://clang.llvm.org/docs/ClangCommandLineReference.html

For example

   -fchar8\_t, -fno-char8\_t

Whether an underscore should be escaped depends on the state. Currently
the escape routine doesn't keep track of the state and currently
underscores are not used in places where they need to be escaped.
Therefore remove the underscore from the list of escaped characters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants