-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
bug 🐛Something isn't workingSomething isn't workingdocumentation 📃Improvements or additions to documentationImprovements or additions to documentation
Description
Describe the bug
See: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/windows/media/effectanimations
It should be replacing these with code, but something isn't working as expected here:
Tooling-Windows-Submodule/Build-Toolkit-Docs.ps1
Lines 42 to 64 in 58649b8
| foreach ($sample in ($contents | Select-String -Pattern '>\s*\[!SAMPLE\s*(?<sampleid>.*)\s*\]\s*' -AllMatches).Matches) { | |
| $sampleid = $sample.Groups[1].Value | |
| $sampleString = $sample.Groups[0].Value | |
| # Find matching filename for CS | |
| foreach ($csFile in Get-ChildItem -Recurse -Path ($markdownFile.DirectoryName + '\**\*.xaml.cs').Replace('\', '/') | | |
| Where-Object { $_.FullName -notlike "*\bin\*" -and $_FullName -notlike "*\obj\*" }) { | |
| $csSample = Get-Content $csFile -Raw | |
| if ($csSample -match '\[ToolkitSample\s?\(\s*id:\s*(?:"|nameof\()\s?' + $sampleid + '\s?(?:"|\))') { | |
| # Get Relative Path | |
| $docPath = $(Join-Path "components" $($csfile.FullName.Replace($componentsRoot.Path, ''))).Replace('\', '/').Trim('/') | |
| # See https://learn.microsoft.com/en-us/contribute/content/code-in-docs#out-of-repo-snippet-references | |
| $snippet = ':::code language="xaml" source="~/../code-windows/' + $docPath.Substring(0, $docPath.Length - 3) + '":::' + "`n`n" | |
| $snippet = $snippet + ':::code language="csharp" source="~/../code-windows/' + $docPath + '":::' + "`n`n" | |
| # Replace our Sample Placeholder with references for docs | |
| $contents = $contents.Replace($sampleString, $snippet) | |
| } | |
| } | |
| } |
Maybe with XAML vs. C#?
Steps to reproduce
Look at docs
Expected behavior
Should have example code vs. sample placeholder
Screenshots
No response
Code Platform
- UWP
- WinAppSDK / WinUI 3
- Web Assembly (WASM)
- Android
- iOS
- MacOS
- Linux / GTK
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 11 21H2 (Build 22000)
- Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Other (specify)
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Additional context
No response
Help us help you
Yes, I'd like to be assigned to work on this item.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🐛Something isn't workingSomething isn't workingdocumentation 📃Improvements or additions to documentationImprovements or additions to documentation
Type
Projects
Status
✅ Done