Skip to content
This repository has been archived by the owner on Feb 13, 2018. It is now read-only.

Remove trailing colons from contents lists #133

Merged
merged 1 commit into from Feb 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/helpers/specialist_documents_helper.rb
Expand Up @@ -31,4 +31,8 @@ def date_hash(date_metadata)
hash.merge(value[:label] => nice_date_format(value[:values]))
end
end

def strip_trailing_colons(heading)
heading.gsub(/\:$/, '')
end
end
2 changes: 1 addition & 1 deletion app/views/specialist_documents/_nav_item.html.erb
Expand Up @@ -6,7 +6,7 @@
data-track-category="contentsClicked"
data-track-action="leftColumnH<%= heading_level %>"
data-track-label="<%= heading['id']%>">
<%= heading['text'] %>
<%= strip_trailing_colons(heading['text']) %>
</a>
<% if heading['headers'].present? %>
<ol class="dash-list">
Expand Down