diff options
author | David Tolnay <dtolnay@gmail.com> | 2015-10-12 22:30:16 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2015-10-12 22:30:16 -0700 |
commit | 0791261f072c5d9563e5a11caa418511f0823067 (patch) | |
tree | e9be86408eeaf50d3dff3563ed1c7c5813535344 /docs | |
parent | 73b8413d10751c7be3e54d83ea338b3e895bdda3 (diff) |
Remove backticks from manual headers and search strings
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Rakefile.website | 10 | ||||
-rw-r--r-- | docs/templates/manual.liquid | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/docs/Rakefile.website b/docs/Rakefile.website index 4044bb2f..76f91efd 100644 --- a/docs/Rakefile.website +++ b/docs/Rakefile.website @@ -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 diff --git a/docs/templates/manual.liquid b/docs/templates/manual.liquid index 12c3072d..59505a95 100644 --- a/docs/templates/manual.liquid +++ b/docs/templates/manual.liquid @@ -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 %} }; |