You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.
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. --links would only control how hyperlinks using [text](url) are converted, not images. A different command line switch like --image-links would only control how image links using ![alt text](url) are converted, and would have the same option values that --links has.
Consider adding an "images-only" option to --links that 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).
The text was updated successfully, but these errors were encountered:
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.
--links
would only control how hyperlinks using[text](url)
are converted, not images. A different command line switch like--image-links
would only control how image links using![alt text](url)
are converted, and would have the same option values that--links
has.Consider adding an "images-only" option to
--links
that 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).
The text was updated successfully, but these errors were encountered: