Feature Request: Allow image links to be treated differently than hyperlinks for --links option
I can appreciate the challenges of converting hyperlinks in Markdown to gemtext, and I think the --links options cover most use-cases.
However image links are different. They are also semantically different, linking content that should be shown with the markdown document, while a hyperlink is taking about navigating to another piece of content.. They are often used as block level elements, instead of inline in a paragraph, which makes their conversion to a gemtext link line straightforward.
As such, it would be helpful to have a way for image links to be converted differently than hyperlinks.
I propose 2 different options:
-
Consider treating image links and hyperlinks completely separately.
--linkswould only control how hyperlinks using[text](url)are converted, not images. A different command line switch like--image-linkswould only control how image links usingare converted, and would have the same option values that--linkshas. -
Consider adding an "images-only" option to
--linksthat would only convert image links to gemtext link lines.
Option 1 is probably the better long term option. You could have separate defaults, and it allows for more control. However it is more involved. Option 2 is easier, but it still conflates image links with hyperlinks, and does not address more edge case options (like wanting no hyperlinks to be converted, and image links to be converted to footnotes at the end of the gemtext).
as a bonus, this might help you resolve: https://github.com/makeworld-the-better-one/md2gemini/issues/24
I opened PR47 which implements option 2:
https://github.com/makeworld-the-better-one/md2gemini/pull/47