Remove backticks from manual headers and search strings

This commit is contained in:
David Tolnay committed 2015-10-12 22:30:16 -07:00
1 parent 73b8413d10
commit 0791261f07
2 files changed
+6 -8

No files matched your search

+4 -6
View File
@@ -7,23 +7,21 @@ module ExtraFilters
def markdownify(input)
Maruku.new(input).to_html
end
def search_id(input)
input.gsub(/`/, '')
end
def section_id(input)
input.gsub(/[^a-zA-Z0-9_]/, '')
end
def entry_id(input)
input.gsub(' ', '')
input.gsub(/[ `]/, '')
end
def no_paragraph(input)
input.gsub('<p>', '').gsub('</p>', '')
end
def json(input)
input.to_json
end
def unique(input)
@n = (@n || 0) + 1
input + @n.to_s
+2 -2
View File
@@ -87,9 +87,9 @@
var section_map = {
{% for section in sections %}
{% for entry in section.entries %}
{{entry.title | json}} : {{entry.title | entry_id | json}},
{{entry.title | search_id | json}} : {{entry.title | entry_id | json}},
{% endfor %}
{{section.title | json}} : {{section.title | section_id | json}}
{{section.title | search_id | json}} : {{section.title | section_id | json}}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};