Render inline code in card titles (#2518)
* Remove unused marked JS dependency * Remove unused redcarpet dependency * Render inline code in card titles Add card_html_title helper that HTML-escapes input then converts backtick-wrapped text to <code> elements. Apply to card titles in board preview, card detail, public views, and notification emails. Style inline code elements in titles to match description styling. Co-authored-by: Andy Smith <andy@37signals.com> --------- Co-authored-by: Andy Smith <andy@37signals.com>
This commit is contained in:
@@ -42,9 +42,14 @@ class CardsControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_redirected_to card_draft_path(card)
|
||||
end
|
||||
|
||||
test "show" do
|
||||
get card_path(cards(:logo))
|
||||
assert_response :success
|
||||
test "show renders inline code in title" do
|
||||
card = cards(:logo)
|
||||
card.update_column :title, "Fix the `bug` in production"
|
||||
|
||||
get card_path(card)
|
||||
assert_select ".card__title-link" do |element|
|
||||
assert_equal "Fix the <code>bug</code> in production", element.inner_html
|
||||
end
|
||||
end
|
||||
|
||||
test "edit" do
|
||||
|
||||
Reference in New Issue
Block a user