Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
maparent
left a comment
There was a problem hiding this comment.
Ok good work in general, one definite small change, and a bigger one MAYBE.
We now have another layer of nesting:
import/<vaultname>/discourseGraphs/<node>.md.
the discourseGraphs folder was not part of the structure before.
I think that was good for users, but I do realize it creates a risk of collision, and it makes path negotiation more complex. Maybe to bring to the group?
| const linkText = getRelativeLinkPath(resolvedFile.path); | ||
| if (linkText) { | ||
| return `[${linkText}](${encodePathForMarkdownLink(linkText)})`; | ||
| } | ||
| return `[[${linkText}]]`; |
There was a problem hiding this comment.
Variable shadowing bug: linkText is redeclared, overwriting the original markdown link display text parameter from line 691. This causes markdown links to lose their original display text and use the file path instead.
// Should be:
const linkPath = getRelativeLinkPath(resolvedFile.path);
if (linkText) {
return `[${linkText}](${encodePathForMarkdownLink(linkPath)})`;
}
return `[${linkPath}](${encodePathForMarkdownLink(linkPath)})`;The pattern at lines 694-700 and 710-714 correctly preserves the original linkText parameter while computing a new linkPath variable.
| const linkText = getRelativeLinkPath(resolvedFile.path); | |
| if (linkText) { | |
| return `[${linkText}](${encodePathForMarkdownLink(linkText)})`; | |
| } | |
| return `[[${linkText}]]`; | |
| const linkPath = getRelativeLinkPath(resolvedFile.path); | |
| if (linkPath) { | |
| return `[${linkText}](${encodePathForMarkdownLink(linkPath)})`; | |
| } | |
| return `[[${linkPath}]]`; |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
…so disguise relative links.
|
Re earlier point:
Was brought to group, new approach was accepted. |
https://www.loom.com/share/72dcd8692629433f984358bb4e86b2b4