Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Added test for inline images

Matt Robertsdef56519e208
diff --git a/public/services/markdown.spec.ts b/public/services/markdown.spec.ts
index 3aa9447ba..f033c5bac 100644
--- a/public/services/markdown.spec.ts
+++ b/public/services/markdown.spec.ts
@@ -13,6 +13,12 @@ const testCases = [
expectedFull: '<p>My Picture <img alt="" src="http://demo.dev.fider.io:3000/images/100/28"></p>',
expectedPlainText: "My Picture",
},
+ {
+ input: "My Fider Picture ![](fider-image:attachments/zy0hBtqrjQki7M56p26AuAXljRoaNUSwZO6MOky5gnYm2nW1rsMmrp3dwhjGk7ok-aden.jpeg)",
+ expectedFull:
+ '<p>My Fider Picture <img data-bkey="attachments/zy0hBtqrjQki7M56p26AuAXljRoaNUSwZO6MOky5gnYm2nW1rsMmrp3dwhjGk7ok-aden.jpeg" class="fider-inline-image" alt="" src="/static/images/attachments/zy0hBtqrjQki7M56p26AuAXljRoaNUSwZO6MOky5gnYm2nW1rsMmrp3dwhjGk7ok-aden.jpeg"></p>',
+ expectedPlainText: "My Fider Picture",
+ },
{
input: "# Hello World",
expectedFull: "<h1>Hello World</h1>",