Videos only shown when on newline

in utopian-io •  7 years ago  (edited)

Expected behavior

When entering a blog entry in markdown image and video links are replaced by images and videos. The expected behavior is that every image and every video is replaced. As an example take this markdown. Two image links and two video links separated by spaces. We expect to see two images and two videos.
Untitled.png

Actual behavior

This only works if video links are placed on new lines. So by pressing the enter key at the blue arrows. If the markdown shown above is used only the first video is shown, not the two images nor the last video. Videos only work correct if they are on their own line.

How to reproduce

This issue can be easily reproduced by using this markdown from the image above. Remember that spaces are important here:

https://cdn.pixabay.com/photo/2014/06/03/19/38/board-361516_960_720.jpg https://cdn.pixabay.com/photo/2017/01/04/13/28/problem-1951987_960_720.jpg https://www.youtube.com/watch?v=VvmtBkJRIOQ https://www.youtube.com/watch?v=LNe60agGKFU

Browser:Opera 52.0.2871.64
OS: Windows 8.1 64-bit

Recording Of The Bug

This animated gif shows the issue. The markdown shown only shows the first video. Putting the last video link on a new line by pressing enter shows the second video in the preview. Putting the first video also on a newline shows both images.
testje.gif

Issue in the code

The issue is in busy/src/client/vendor/steemitHtmlReady.js in isEmbedable where only the first video link is processed. When putting the links on new lines this results in separated html paragraphs which masks the issue. Images are processed correctly and do not need newlines in between.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  7 years ago 

Thank you for the report, however, we feel that this is not a bug based on the following:

  1. there is no formal syntax in Markdown to insert a video
  2. usually people convert video to GIF and use ![]()
  3. it is up to the system (either busy or steemit) to interpret the syntax.

Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

  ·  7 years ago (edited)

I find it unfortunate you think about it like this:

  1. true, but reasoning like this there would be no video anyway
  2. irrelevant, it's a feature, doesn't matter how popular it is
  3. they do, the behavior described is not the intention so it is not a choice to interpret the markdown like this, if you look at the code it is clear the intention is not to do this, so that makes it a bug

Even if it were not a bug it would make for a good suggestion.

I contacted @fabien about this and he considered it a bug and added it:
https://github.com/busyorg/busy/issues/1780

I approved it, thanks for being so cool about it @wieske

Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Hey @wieske! Thank you for the great work you've done!

We're already looking forward to your next contribution!

Fully Decentralized Rewards

We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.me/utopian-io