1
0
mirror of synced 2026-08-05 14:47:03 +00:00

FEATURE: Markdown support for product description (#21)

This commit is contained in:
Faizaan Gagan
2020-10-12 20:31:33 +05:30
committed by GitHub
parent 866e485c1c
commit 55e6accb9c
4 changed files with 6 additions and 6 deletions
@@ -46,7 +46,7 @@ module DiscourseSubscriptions
{
id: product[:id],
name: product[:name],
description: product[:metadata][:description],
description: PrettyText.cook(product[:metadata][:description]),
subscribed: current_user_products.include?(product[:id])
}
end
@@ -6,7 +6,7 @@
<h2>{{product.name}}</h2>
<p class="product-description">
{{product.description}}
{{html-safe product.description}}
</p>
{{#if isLoggedIn}}
@@ -8,7 +8,7 @@
<hr>
<p>
{{model.product.description}}
{{html-safe model.product.description}}
</p>
</div>
<div class="section-column">
+3 -3
View File
@@ -32,7 +32,7 @@ module DiscourseSubscriptions
expect(response.parsed_body).to eq([{
"id" => "prodct_23456",
"name" => "Very Special Product",
"description" => "Many people listened to my phone call with the Ukrainian President while it was being made",
"description" => PrettyText.cook("Many people listened to my phone call with the Ukrainian President while it was being made"),
"subscribed" => false
}])
end
@@ -54,7 +54,7 @@ module DiscourseSubscriptions
expect(response.parsed_body).to eq([{
"id" => "prodct_23456",
"name" => "Very Special Product",
"description" => "Many people listened to my phone call with the Ukrainian President while it was being made",
"description" => PrettyText.cook("Many people listened to my phone call with the Ukrainian President while it was being made"),
"subscribed" => false
}])
end
@@ -86,7 +86,7 @@ module DiscourseSubscriptions
expect(response.parsed_body).to eq(
"id" => "prodct_23456",
"name" => "Very Special Product",
"description" => "Many people listened to my phone call with the Ukrainian President while it was being made",
"description" => PrettyText.cook("Many people listened to my phone call with the Ukrainian President while it was being made"),
"subscribed" => false
)
end