vault backup: 2026-03-30 22:54:00
This commit is contained in:
@@ -33,7 +33,7 @@ function Import-Markdown {
|
||||
catch {
|
||||
throw "no YAML conversion module installed. Try ``Install-Module powershell-yaml``."
|
||||
}
|
||||
|
||||
|
||||
$content = Get-Content -Path $Path -Raw
|
||||
$pattern = [Regex]'(?ms)^---\s*(.*?)\s*---\s*(.*)$'
|
||||
$match = $pattern.Match($content)
|
||||
@@ -45,7 +45,7 @@ function Import-Markdown {
|
||||
$frontmatter = ''
|
||||
$body = $content
|
||||
}
|
||||
|
||||
|
||||
return [pscustomobject]@{
|
||||
frontmatter = $frontmatter | ConvertFrom-Yaml
|
||||
body = $body
|
||||
|
||||
Reference in New Issue
Block a user