Skip to content

Commit

Permalink
fix: toc with children getting displayed as "note" (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
Multivit4min authored and tmcw committed Jun 12, 2019
1 parent b6901b4 commit 14298bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/default_theme/index._
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</div>
<div id='split-right' class='relative overflow-auto height-viewport-100'>
<% docs.forEach(function(s) { %>
<% if (s.kind === 'note') { %>
<% if (s.kind === 'note' && !s.children) { %>
<div class='keyline-top-not py2'><%=renderNote({ note: s })%></div>
<% } else { %>
<%= renderSection({
Expand Down
18 changes: 8 additions & 10 deletions src/default_theme/note._
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<% if (!note.children) { %>
<section class='py2 clearfix'>
<section class='py2 clearfix'>

<h2 id='<%- slug(note.namespace) %>' class='mt0'>
<%- note.name %>
</h2>
<h2 id='<%- slug(note.namespace) %>' class='mt0'>
<%- note.name %>
</h2>

<% if (note.description) { %>
<%= md(note.description) %>
<% } %>
</section>
<% } %>
<% if (note.description) { %>
<%= md(note.description) %>
<% } %>
</section>

0 comments on commit 14298bb

Please sign in to comment.