Add Youtube embeds
This will embed a youtube video inline on the page. Hopefully it works! Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -103,3 +103,15 @@ what happened to the 1 2 3 4 5 6 7 8 9
|
||||
for input, output in expected:
|
||||
rb = ReplyBuilder(input.strip(), parse_spoilers=True)
|
||||
self.assertEquals(rb.build(), output)
|
||||
|
||||
def test_youtube_embed(self):
|
||||
expected = [
|
||||
(
|
||||
"https://www.youtube.com/watch?v=O_3_-UrhZH0",
|
||||
'<span class="youtube_embed"><span class="youtube_embed_container">https://www.youtube.com/watch?v=O_3_-UrhZH0 [<a class="youtube_embed_link" data-yt-hash="O_3_-UrhZH0" href="https://www.youtube.com/watch?v=O_3_-UrhZH0">Embed</a>]</span></span>',
|
||||
),
|
||||
]
|
||||
|
||||
for input, output in expected:
|
||||
rb = ReplyBuilder(input.strip())
|
||||
self.assertEquals(rb.build(), output)
|
||||
|
||||
Reference in New Issue
Block a user