Skip to content

Merge Cfg::render_long_html and Cfg::render_long_plain methods common code #141770

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GuillaumeGomez
Copy link
Member

Follow-up of #141747.

Thanks @camelid for spotting it!

r? @camelid

…common code

* Fix invalid whitespace handling
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels May 30, 2025
let on = if self.omit_preposition() {
""
" "
Copy link
Member Author

Choose a reason for hiding this comment

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

I changed this a bit because the generated whitespace characters were invalid in render_long_plain with the previous code (two whitespace characters after Available for this case).

@GuillaumeGomez GuillaumeGomez force-pushed the cfg-false-mod-rendering branch from 4655783 to 358d5ea Compare May 30, 2025 13:39
// a cfg(true) will simply be ommited, as it is the same as no cfg.
//@ !has 'foo/fn.bar.html' '//div[@class="stab portability"]' ''
// a cfg(true) will simply be omited, as it is the same as no cfg.
//@ count 'foo/fn.bar.html' '//*[@class="stab portability"]' 0
Copy link
Member Author

Choose a reason for hiding this comment

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

We should maybe restrain usage of !has as it's so easily outdated...

* Fix typo
* Remove usage of `!has`
@GuillaumeGomez GuillaumeGomez force-pushed the cfg-false-mod-rendering branch from 358d5ea to fca28ab Compare June 3, 2025 08:35
@GuillaumeGomez
Copy link
Member Author

Fixed typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants