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('
', '').gsub('
', '') 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 %} };