8000 fix: replace document links when importing markdown by hmacr · Pull Request #7259 · outline/outline · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: replace document links when importing markdown #7259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

hmacr
Copy link
Collaborator
@hmacr hmacr commented Jul 16, 2024

Closes #7089

@auto-assign auto-assign bot requested a review from tommoor July 16, 2024 09:57
if (referredDocId) {
document.text = document.text.replace(
referredDocPath,
`<<${referredDocId}>>`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is handled during persistence here (gets replaced with doc/{docId}).
This gets handled in the UI as the app takes care of redirection based on id / slug.
However, when collections with this kind of docs are exported, the internal doc links are not replaced with the corresponding relative URLs.

I'm working on another PR that essentially removes doc/{docId} trick and sets the proper doc slug during persistence itself. For backward compatibility, the exporters will handle the docId replacement as well.

Copy link
Member

Choose a reason for hiding this comment

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

I'm working on another PR that essentially removes doc/{docId} trick and sets the proper doc slug

👏

@hmacr
Copy link
Collaborator Author
hmacr commented Jul 16, 2024

#7089 is a problem for JSON importer as well - I figured it can be fixed as part of #6174 (avoids re-work).

Howeve 8000 r, I can add the JSON fix to this PR if it's of high priority.

@tommoor tommoor merged commit e4c1281 into outline:main Jul 22, 2024
10 checks passed
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.

Markdown internal links after import
2 participants
0