Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert snippet references from old [!code-lang[...]] syntax to new :::code syntax#11759

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-ccaa149b-91bd-4a3a-b681-a7d38d8d4a10

Conversation

Copy link
Contributor

CopilotAI commentedSep 3, 2025
edited
Loading

This PR converts all snippet references in XML documentation files from the legacy[!code-lang[...]] syntax to the new:::code syntax as specified in the issue requirements.

Changes Made

Before:

[!code-csharp[CreateElement Example](~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source.cs#1)][!code-vb[System.Web.Profile.ProfileManager.ProfileAutoSaving#11](~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax#11)][!code-cpp[DiscoveryClientProtocol_AdditionalInformation#1](~/snippets/cpp/VS_Snippets_Remoting/DiscoveryClientProtocol_AdditionalInformation/CPP/discoveryclientprotocol_additionalinformation.cpp#1)]

After:

:::code language="csharp" source="~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source.cs"::::::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.Web.Profile.ProfileManager.ProfileAutoSaving/VB/global.asax"::::::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/DiscoveryClientProtocol_AdditionalInformation/CPP/discoveryclientprotocol_additionalinformation.cpp":::

Transformation Rules Applied

  1. Language mapping:code-csharplanguage="csharp",code-vblanguage="vb",code-cpplanguage="cpp"
  2. Path extraction: Moved from(~/path/file.ext#id) tosource="~/path/file.ext"
  3. ID normalization: Added "Snippet" prefix when missing (e.g.,#1id="Snippet1")
  4. Description removal: Discarded description text as it's not used in the new format
  5. Syntax change:[!code-...]:::code ... :::

Summary

  • Files changed: 170 XML documentation files
  • Total conversions: ~1,742 snippet references converted
  • Languages supported: C#, VB.NET, and C++
  • Verification: All old-style references successfully converted with zero remaining[!code- patterns

This change modernizes the documentation to use the current standard snippet reference syntax while maintaining all existing functionality and snippet links.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Clickhere to start the survey.

…::code syntaxCo-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
CopilotAI changed the title[WIP] Convert any[!code-csharp[CreateElement Example](~/snippets/csharp/System.Xml/XmlDocument/CreateElement/source.cs#1)] style snippet references to use the::: syntax instead, for example:`:::code language="csharp" source="~/snippets/csharp/System....Convert snippet references from old [!code-lang[...]] syntax to new :::code syntaxSep 3, 2025
CopilotAI requested a review fromgewarrenSeptember 3, 2025 00:27
Copilot finished work on behalf ofgewarrenSeptember 3, 2025 00:27
@gewarren
Copy link
Contributor

@copilot Can you revert any changes where the referenced snippet file isn't a .cs, .vb, or .cpp file?

@gewarren
Copy link
Contributor

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gewarrengewarrenAwaiting requested review from gewarren

@mconnewmconnewAwaiting requested review from mconnewmconnew will be requested when the pull request is marked ready for reviewmconnew is a code owner

At least 1 approving review is required to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@gewarren

[8]ページ先頭

©2009-2025 Movatter.jp