mirror of
https://github.com/sbrow/thor.git
synced 2026-10-25 02:01:56 -04:00
fix: Fixed an issue with broken paths in nix build.
This commit is contained in:
@@ -363,7 +363,7 @@ input: "{{> footer }}"
|
|||||||
should: warn
|
should: warn
|
||||||
expected: |
|
expected: |
|
||||||
first -3 is equivalent to last 3
|
first -3 is equivalent to last 3
|
||||||
--> /home/spencer/github.com/sbrow.github.io/thor/mustache/fixtures/layouts/partials/footer.html:11:78
|
--> fixtures/layouts/partials/footer.html:11:78
|
||||||
|
|
|
|
||||||
9 | href="https://edwardtufte.github.io/tufte-css/">Tufte CSS</a>
|
9 | href="https://edwardtufte.github.io/tufte-css/">Tufte CSS</a>
|
||||||
10 | </p>
|
10 | </p>
|
||||||
|
|||||||
@@ -162,6 +162,7 @@
|
|||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
unstable.helix
|
unstable.helix
|
||||||
|
claude-code
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
vscode-langservers-extracted
|
vscode-langservers-extracted
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -513,7 +513,18 @@ diag_ctx :: proc() -> Diag_Context {
|
|||||||
diag_partials :: proc() -> map[string]Template {
|
diag_partials :: proc() -> map[string]Template {
|
||||||
dirs := [?]string{#directory, "fixtures/layouts/partials"}
|
dirs := [?]string{#directory, "fixtures/layouts/partials"}
|
||||||
partials_dir, _ := filepath.join(dirs[:], context.temp_allocator)
|
partials_dir, _ := filepath.join(dirs[:], context.temp_allocator)
|
||||||
return load_partials(partials_dir, allocator = context.temp_allocator)
|
partials := load_partials(partials_dir, allocator = context.temp_allocator)
|
||||||
|
// #directory expands to an absolute, build-environment-specific path (e.g.
|
||||||
|
// /build/... inside the nix sandbox vs a local checkout). Strip it so
|
||||||
|
// partial diagnostics reference a stable path across environments, keeping
|
||||||
|
// the golden expected output deterministic.
|
||||||
|
for key, tmpl in partials {
|
||||||
|
t := tmpl
|
||||||
|
rel := strings.trim_prefix(t.path, #directory)
|
||||||
|
t.path = strings.trim_left(rel, "/")
|
||||||
|
partials[key] = t
|
||||||
|
}
|
||||||
|
return partials
|
||||||
}
|
}
|
||||||
|
|
||||||
diag_slug :: proc(name: string) -> string {
|
diag_slug :: proc(name: string) -> string {
|
||||||
|
|||||||
Reference in New Issue
Block a user