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

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

Open
SmartManoj opened this issue Jun 17, 2019 · 13 comments

Comments

@SmartManoj
Copy link
Contributor

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

@shu8
Copy link
Member

shu8 commented Jun 17, 2019 via email

@SmartManoj
Copy link
Contributor Author

SmartManoj commented Jun 17, 2019

[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]

@shu8
Copy link
Member

shu8 commented Jun 17, 2019

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?

@SmartManoj
Copy link
Contributor Author

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

@shu8
Copy link
Member

shu8 commented Jun 18, 2019

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?

@SmartManoj
Copy link
Contributor Author

It will be useful when editing old post.

@SmartManoj
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@shu8
Copy link
Member

shu8 commented Jun 20, 2019

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!

@SmartManoj
Copy link
Contributor Author

[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

@shu8
Copy link
Member

shu8 commented Jun 21, 2019

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? :)

@SmartManoj
Copy link
Contributor Author

S. #404 done

@SmartManoj SmartManoj changed the title [Feature Request] Image Link Conversion [Feature Request] Detect and convert links to URLs that are images but not in the correct markdown format to the correct format Jun 22, 2019
@shu8 shu8 changed the title [Feature Request] Detect and convert links to URLs that are images but not in the correct markdown format to the correct format Convert links to URLs that are images but not in the correct markdown format to the correct format Jun 22, 2019
@shu8
Copy link
Member

shu8 commented Jun 22, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants