Videos only shown when on newline

in #utopian-io7 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 condenser/src/shared/HtmlReady.js in embedYouTubeNode where only the first video link is processed and the complete node is replaced. 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

Sort:  

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]

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

Coin Marketplace

STEEM 0.24
TRX 0.21
JST 0.036
BTC 97815.63
ETH 3380.51
USDT 1.00
SBD 3.31