mirror of
https://github.com/Dasemu/Synapse.git
synced 2026-11-26 23:36:20 +00:00
Logseq-like outliner (render/edit Markdown per block, Enter/Tab/Shift-Tab, backspace merge, arrow navigation, drag to reorder, collapse, [[ # (( autocomplete, TODO/DONE), journals feed with prev/next links, page view with linked references and related panel, virtualised CustomPainter timeline, Ctrl+K quick switcher, sidebar with recents, light/dark theme with bundled Inter, Noto Serif and Source Code Pro. Edits are optimistic and serialised to the core through one write queue. Cargokit builds synapse-ffi; its build tool is patched to use the library name (synapse_ffi) of hyphenated crates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
925 B
PowerShell
35 lines
925 B
PowerShell
function Resolve-Symlinks {
|
|
[CmdletBinding()]
|
|
[OutputType([string])]
|
|
param(
|
|
[Parameter(Position = 0, Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
|
|
[string] $Path
|
|
)
|
|
|
|
[string] $separator = '/'
|
|
[string[]] $parts = $Path.Split($separator)
|
|
|
|
[string] $realPath = ''
|
|
foreach ($part in $parts) {
|
|
if ($realPath -and !$realPath.EndsWith($separator)) {
|
|
$realPath += $separator
|
|
}
|
|
|
|
$realPath += $part.Replace('\', '/')
|
|
|
|
# The slash is important when using Get-Item on Drive letters in pwsh.
|
|
if (-not($realPath.Contains($separator)) -and $realPath.EndsWith(':')) {
|
|
$realPath += '/'
|
|
}
|
|
|
|
$item = Get-Item $realPath
|
|
if ($item.LinkTarget) {
|
|
$realPath = $item.LinkTarget.Replace('\', '/')
|
|
}
|
|
}
|
|
$realPath
|
|
}
|
|
|
|
$path = Resolve-Symlinks -Path $args[0]
|
|
Write-Host $path
|