diff --git a/docs/Rakefile b/docs/Rakefile index b204dfa9..8de64a7e 100644 --- a/docs/Rakefile +++ b/docs/Rakefile @@ -12,8 +12,12 @@ module ExtraFilters Maruku.new(input).to_html end - def sanitize(input) - input.gsub(/[^a-zA-Z0-9_]/,"") + def section_id(input) + input.gsub(/[^a-zA-Z0-9_]/, '') + end + + def entry_id(input) + input.gsub(' ', '') end def no_paragraph(input) diff --git a/docs/templates/manual.liquid b/docs/templates/manual.liquid index d464b801..6aa08571 100644 --- a/docs/templates/manual.liquid +++ b/docs/templates/manual.liquid @@ -12,7 +12,7 @@ @@ -30,11 +30,11 @@ {{ history | markdownify }} {{ body | markdownify }} {% for section in sections %} -
+

{{section.title}}

{{section.body | markdownify}} {% for entry in section.entries %} -
+

{{entry.title | markdownify | no_paragraph}} {% if entry.subtitle %}{{entry.subtitle}}{% endif %} @@ -87,9 +87,9 @@ var section_map = { {% for section in sections %} {% for entry in section.entries %} - {{entry.title | json}} : {{entry.title | sanitize | json}}, + {{entry.title | json}} : {{entry.title | entry_id | json}}, {% endfor %} - {{section.title | json}} : {{section.title | sanitize | json}} + {{section.title | json}} : {{section.title | section_id | json}} {% unless forloop.last %},{% endunless %} {% endfor %} };