-
Notifications
You must be signed in to change notification settings - Fork 173
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
fix(cli): render images in local preview #5889
Conversation
1e91289
to
f53163f
Compare
const path = "/" + file.url.replace("/_local/", ""); | ||
return [AbsoluteFilePath.of(path), id]; | ||
}) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is happening in this transformation here?
Before you merge, you'll want to add a changelog to https://github.com/fern-api/fern/blob/main/packages/cli/cli/versions.yml -- that way a new version will get published to npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Edsun457 can you fix lint
and add a changelog? Other than that, we are good to go!
7e6a617
to
76277ca
Compare
Description
Fix ticket #5756
Cause of the issue
In local environment when re-rendering markdown files, the image rendered to browser as file relative path. The browser can not parse the image unless it's the image ID matched in FileV2
For example:
<img src="./table-of-contents.png" alt="Table of contents feature" />
What this PR fixed
<img src="file:86a5f557-626e-418e-9e7a-e9f1cdc723f2" alt="Edit this page feature" />
Changes Made
Add logic to populate image file id so would render the right image to the browser for local env
Testing