Skip to content

fix: resolve linked resources against the plain file's directory - #315

Merged
NejcS merged 1 commit into
mainfrom
fix/eng-205-resolve-linked-resources-against-spec-dir
Sep 28, 2026
Merged

NejcS merged 1 commit into
mainfrom
fix/eng-205-resolve-linked-resources-against-spec-dir

Conversation

@NejcS

@NejcS NejcS commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Make markdown-linked resources in a .plain spec resolve against the directory containing that spec, so a render gives the same result no matter which directory codeplain runs from.

Issue reproduction verified from three directories — the module directory, its parent, and /. All three now render identically.

@NejcS
NejcS requested a review from bananaplain September 14, 2026 09:06
@NejcS
NejcS force-pushed the fix/eng-205-resolve-linked-resources-against-spec-dir branch from 5e4cb5b to 03dede9 Compare September 16, 2026 11:09
@NejcS NejcS changed the title fix: resolve linked resources against the plain file's directory (ENG-205) fix: resolve linked resources against the plain file's directory Sep 17, 2026
Comment thread plain_file.py Outdated

@bananaplain bananaplain left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plain forge rules should be synced too: in rules/linked-resources.md, section "File location and path resolution": the first bullet still says paths resolve against the directory where codeplain is run.

@NejcS
NejcS force-pushed the fix/eng-205-resolve-linked-resources-against-spec-dir branch from 9dddf4c to c166fb3 Compare September 21, 2026 13:36
@NejcS

NejcS commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, @bananaplain I improved that. I also opened a PR in plain-forge to fix the references: plainlang/plain-forge#25

@NejcS
NejcS force-pushed the fix/eng-205-resolve-linked-resources-against-spec-dir branch from c166fb3 to 886de4b Compare September 25, 2026 07:36
@bananaplain

Copy link
Copy Markdown
Contributor

Something seems to be up with the tests @NejcS 👀

@NejcS

NejcS commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Something seems to be up with the tests @NejcS 👀

Ah yeah, you're right. But this fixed it => #324

I'll rebase this branch.

@NejcS
NejcS force-pushed the fix/eng-205-resolve-linked-resources-against-spec-dir branch from 886de4b to 32d0afc Compare September 28, 2026 07:35
@NejcS

NejcS commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

@bananaplain that worked. Please check plainlang/plain-forge#25 too.

@bananaplain bananaplain left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NejcS
NejcS merged commit 8f131eb into main Sep 28, 2026
15 checks passed
@NejcS
NejcS deleted the fix/eng-205-resolve-linked-resources-against-spec-dir branch September 28, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants