diff --git a/lib/prmd/templates/table_of_contents.erb b/lib/prmd/templates/table_of_contents.erb index 718807b..c46a216 100644 --- a/lib/prmd/templates/table_of_contents.erb +++ b/lib/prmd/templates/table_of_contents.erb @@ -6,6 +6,6 @@ <% _, schemata = schema.dereference(property) %> - <%= schemata['title'].split(' - ', 2).last %> <% schemata.fetch('links', []).each do |l| %> - - <%= l['method'] %> <%= build_link_path(schema, l) %> + - <%= l['method'] %> <%= build_link_path(schema, l) %> <% end %> <% end %> diff --git a/test/commands/render_test.rb b/test/commands/render_test.rb index eff8a6c..c739386 100644 --- a/test/commands/render_test.rb +++ b/test/commands/render_test.rb @@ -39,7 +39,7 @@ def test_render_for_toc assert_match /^## The table of contents/, markdown assert_match 'POST /apps', markdown + assert_match '- POST /apps', markdown assert_match '