Remove backticks from manual headers and search strings
This commit is contained in:
1 parent
73b8413d10
commit
0791261f07
2 files changed
+6
-8
No files matched your search
@@ -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
|
||||
|
||||
Vendored
+2
-2
@@ -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 %}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user