Videos only shown when on newline
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.
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.
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
Thank you for the report, however, we feel that this is not a bug based on the following:
![]()
Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.
[utopian-moderator]
I find it unfortunate you think about it like this:
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