mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 15:22:46 +00:00
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],
|
id: product[:id],
|
||||||
name: product[:name],
|
name: product[:name],
|
||||||
description: product[:metadata][:description],
|
description: PrettyText.cook(product[:metadata][:description]),
|
||||||
subscribed: current_user_products.include?(product[:id])
|
subscribed: current_user_products.include?(product[:id])
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<h2>{{product.name}}</h2>
|
<h2>{{product.name}}</h2>
|
||||||
|
|
||||||
<p class="product-description">
|
<p class="product-description">
|
||||||
{{product.description}}
|
{{html-safe product.description}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{#if isLoggedIn}}
|
{{#if isLoggedIn}}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{{model.product.description}}
|
{{html-safe model.product.description}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section-column">
|
<div class="section-column">
|
||||||
|
@ -32,7 +32,7 @@ module DiscourseSubscriptions
|
|||||||
expect(response.parsed_body).to eq([{
|
expect(response.parsed_body).to eq([{
|
||||||
"id" => "prodct_23456",
|
"id" => "prodct_23456",
|
||||||
"name" => "Very Special Product",
|
"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
|
"subscribed" => false
|
||||||
}])
|
}])
|
||||||
end
|
end
|
||||||
@ -54,7 +54,7 @@ module DiscourseSubscriptions
|
|||||||
expect(response.parsed_body).to eq([{
|
expect(response.parsed_body).to eq([{
|
||||||
"id" => "prodct_23456",
|
"id" => "prodct_23456",
|
||||||
"name" => "Very Special Product",
|
"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
|
"subscribed" => false
|
||||||
}])
|
}])
|
||||||
end
|
end
|
||||||
@ -86,7 +86,7 @@ module DiscourseSubscriptions
|
|||||||
expect(response.parsed_body).to eq(
|
expect(response.parsed_body).to eq(
|
||||||
"id" => "prodct_23456",
|
"id" => "prodct_23456",
|
||||||
"name" => "Very Special Product",
|
"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
|
"subscribed" => false
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user