Skip to content

Fix invalid <clear /> element in nuget.config example - #45908

Open
SurefireStudios wants to merge 1 commit into
github:mainfrom
SurefireStudios:fix-nuget-clear-element
Open

SurefireStudios wants to merge 1 commit into
github:mainfrom
SurefireStudios:fix-nuget-clear-element

Conversation

@SurefireStudios

Copy link
Copy Markdown
Contributor

Why:

Closes:

No existing issue — found by parsing every fenced xml block in content/.

"Remove access to public registries" writes the NuGet clear element as < clear />, with a space between the angle bracket and the tag name. XML element names cannot begin with whitespace, so:

  • The xml example does not parse as XML.
  • NuGet rejects the resulting nuget.config, which is the opposite of what the article is instructing readers to do.

This is a typo rather than a convention: the correct spelling <clear /> is already used twice in Working with the NuGet registry, and < clear /> appears nowhere else in content/.

What's being changed (if available, include any code snippets, screenshots, or gifs):

Removed the stray space in all three occurrences — once in the xml code block, and twice in the prose that describes it (the prose is wrong in the same way, so fixing only the code block would leave the article inconsistent with itself).

After the change the block parses, and the packageSources section resolves as intended:

root = configuration
  child: clear {}
  child: add {'key': 'example-nuget', 'value': 'https://private_registry_url/nuget/example-nuget/index.json'}

Note: this touches the same article as #45907, but a different section and non-overlapping lines, so the two can merge in either order. Happy to combine them if you'd rather review one PR.

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

The NuGet section wrote the element as `< clear />` with a space between
the angle bracket and the tag name, in the XML example and twice in the
surrounding prose. XML element names cannot begin with whitespace, so the
example does not parse and NuGet rejects the resulting nuget.config.

The correct spelling `<clear />` is already used in
"Working with the NuGet registry".
Copilot AI balanced review requested due to automatic review settings September 15, 2026 15:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/remove-access-to-public-registries.md fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18 3.17
fpt
ghec
ghes@ 3.22 3.21 3.20 3.19 3.18 3.17

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage Do not begin working on this issue until triaged by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants