sox icon indicating copy to clipboard operation
sox copied to clipboard

Convert links to URLs that are images but not in the correct markdown format to the correct format

Open SmartManoj opened this issue 6 years ago • 13 comments

Tool in Editing Post for Image Links to this format [![enter image description here][number]][number]

SmartManoj avatar Jun 17 '19 07:06 SmartManoj

Thanks for the feature request. Would you mind adding a quick example of what you'd like the feature to do? A before and after markdown sample would be great!

On Mon, 17 Jun 2019, 08:10 SmartManoj, [email protected] wrote:

Tool in Editing Post for Image Links to this format [![enter image description here][number]][number]

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/soscripted/sox/issues/399?email_source=notifications&email_token=ACDQ3DWLLZCUZHNKCP7GOCDP242GJA5CNFSM4HYTZBV2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZZ3V2Q, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDQ3DV7L33H5KWJ6DNLRPDP242GJANCNFSM4HYTZBVQ .

shu8 avatar Jun 17 '19 08:06 shu8

[img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png)

To

[![img][n]][n]

[n]:https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png

where n is total no of links +1


[img][x]

To

[![img][x]][x]

SmartManoj avatar Jun 17 '19 08:06 SmartManoj

By [img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png) do you mean ![img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png), or are you looking for the feature to determine which links are images and also prepend the ! before them?

shu8 avatar Jun 17 '19 17:06 shu8

First one ; Second also better by checking for png , jpg

SmartManoj avatar Jun 18 '19 01:06 SmartManoj

I'm a bit unsure about this feature and useful it would be. Do you have a particular use case for wanting to convert between the two formats?

shu8 avatar Jun 18 '19 08:06 shu8

It will be useful when editing old post.

SmartManoj avatar Jun 18 '19 08:06 SmartManoj

By [img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png) do you mean ![img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png), or are you looking for the feature to determine which links are images and also prepend the ! before them?

Not like this, [img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png) to ![[img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png)](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png) What's the recommended syntax for an image with a link?

SmartManoj avatar Jun 18 '19 08:06 SmartManoj

Or It will be better to zoom out image instead of opening.

SmartManoj avatar Jun 18 '19 08:06 SmartManoj

It will be useful when editing old post.

Sorry, I still can't see the use case in editing old posts :/ I am fairly sure both image formats should work on all posts!

Or It will be better to zoom out image instead of opening.

Could you expand on this please? I'm not sure I understand what you mean here!

shu8 avatar Jun 20 '19 19:06 shu8

[img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png) to ![[img](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png)](https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png)

Some people post image as hyperlink

[img](image link)

Recommended way

![[img][1]][1]
[1]:image link

Or It will be better to zoom out image instead of opening.

Like this https://codepen.io/ongtiffany/pen/BoOeQV?editors=0100

SmartManoj avatar Jun 21 '19 03:06 SmartManoj

Ah thanks, I think I've understood now. This seems like two feature requests now:

  1. Detect and convert links to URLs that are images but not in the correct markdown format to the correct format
  2. Open links to images as an enlarged modal instead of a new tab

Is this right? if so, please could you make another issue for number 2? :)

shu8 avatar Jun 21 '19 18:06 shu8

S. #404 done

SmartManoj avatar Jun 22 '19 03:06 SmartManoj

Thanks. I've marked this as 'contributions welcome', as I don't think I'll have time to get this done anytime soon, and at first glance it doesn't seem to be extremely trivial.

shu8 avatar Jun 22 '19 08:06 shu8