fix(markdown): preserve image URL in citation conversion#1994
Open
devteamaegis wants to merge 1 commit into
Open
fix(markdown): preserve image URL in citation conversion#1994devteamaegis wants to merge 1 commit into
devteamaegis wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
DefaultMarkdownGenerator.convert_links_to_citationsconvertsimage links to![alt⟨n⟩]— dropping the(url)part. This is invalid Markdown: images without a URL render as broken empty brackets rather than the actual image.Before (broken):
After (fixed):
Root cause
The citation conversion for images only rebuilt the
![text⟨n⟩]part without the trailing(url):Regular hyperlinks
[text](url)→text⟨n⟩correctly omit the URL (it goes to the References section). But images need their URL kept inline because:Fix
One-character change: add
({url})back to the image output: