File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ function ProcessMarkdownFile($markdownFile) {
3737
3838 # Insert Header
3939 $contents = $contents.Substring (0 , $endIndex + 5 ) + " `n # $header `n " + $contents.Substring ($endIndex + 5 )
40-
40+
4141 # Find Sample Placeholders, replace with code content
4242 foreach ($sample in ($contents | Select-String - Pattern ' >\s*\[!SAMPLE\s*(?<sampleid>.*)\s*\]\s*' - AllMatches).Matches) {
4343 $sampleid = $sample.Groups [1 ].Value
@@ -47,8 +47,8 @@ function ProcessMarkdownFile($markdownFile) {
4747 foreach ($csFile in Get-ChildItem - Recurse - Path ($markdownFile.DirectoryName + ' \**\*.xaml.cs' ).Replace(' \' , ' /' ) |
4848 Where-Object { $_.FullName -notlike " *\bin\*" -and $_FullName -notlike " *\obj\*" }) {
4949 $csSample = Get-Content $csFile - Raw
50-
51- if ($csSample -match ' \[ToolkitSample\s?\(\s*id: \s*(?:"|nameof\()\s?' + $sampleid + ' \s?(?:"|\))' ) {
50+
51+ if ($csSample -match ' \[ToolkitSample\s?\(\s*(?:id\:)? \s*(?:"|nameof\()\s?' + $sampleid + ' \s?(?:"|\))' ) {
5252 # Get Relative Path
5353 $docPath = $ (Join-Path " components" $ ($csfile.FullName.Replace ($componentsRoot.Path , ' ' ))).Replace(' \' , ' /' ).Trim(' /' )
5454
You can’t perform that action at this time.
0 commit comments