FEATURE: Markdown support for product description (#21)
This commit is contained in:
parent
866e485c1c
commit
55e6accb9c
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue