Skip to content
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

Add support for inline images in Markdown #746

Open
rock3r opened this issue Jan 15, 2025 · 0 comments
Open

Add support for inline images in Markdown #746

rock3r opened this issue Jan 15, 2025 · 0 comments
Assignees
Labels
feature New feature or request markdown This issue impacts the Markdown rendering subsystem

Comments

@rock3r
Copy link
Collaborator

rock3r commented Jan 15, 2025

Inline images in Markdown are not trivial. They require using InlineTextContent, but that in order is not easy. In particular, since multiple images can have the same URL in an AnnotatedString, we need a way to keep track of, and generate, unique IDs for each image in DefaultInlineMarkdownRenderer. This also needs to work with extensions, which in turn will end up finding images and will need univocity of their IDs.

Unfortunately, IDs are plain strings, which is a giant pain in the arse.

An idea is to structure the IDs to contain a prefix saying "this is an image", then the image URL, and then an index, all separated by a newline or another non-URL-safe character

@rock3r rock3r added feature New feature or request markdown This issue impacts the Markdown rendering subsystem labels Jan 15, 2025
@rock3r rock3r self-assigned this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request markdown This issue impacts the Markdown rendering subsystem
Projects
None yet
Development

No branches or pull requests

1 participant