Skip to content
This repository has been archived by the owner on Jun 25, 2019. It is now read-only.

Commit

Permalink
working on TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
shiffman committed Apr 20, 2016
1 parent cfedebc commit 451f375
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chapters/00_6_TOC.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section data-type="toc" id="_toc">
<p>TOC TO GO HERE</p>
{{TOC}}
</section>
5 changes: 5 additions & 0 deletions includes/footnotes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ol data-type="footnotes">
{% for footnote in footnotes %}
<li id="{{ footnote.id }}">{{ footnote.label }}</li>
{% endfor %}
</ol>
7 changes: 7 additions & 0 deletions includes/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% if navigation.prev %}
<a id="prev-link" href="{{ navigation.prev.href }}">Previous: {{navigation.prev.label}}</a>
{% endif %}

{% if navigation.next %}
<a id="next-link" href="{{ navigation.next.href }}">Next: {{navigation.next.label}}</a>
{% endif %}
6 changes: 6 additions & 0 deletions includes/toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<nav data-type='toc'>
<h1>Table of Contents</h1>
<ol>
{% include toc_item.html children=toc.children %}
</ol>
</nav>
10 changes: 10 additions & 0 deletions includes/toc_item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% for item in children %}
<li>
<a href="{{ item.href }}">{{ item.label }}</a>
{% if item.children.length > 0 %}
<ol>
{% include toc_item.html children=item.children %}
</ol>
{% endif %}
</li>
{% endfor %}
11 changes: 10 additions & 1 deletion regex-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,13 @@ $1$2
h1s --> h2

<h1>(.*?)</h1>
<h2>$1</h2>
<h2>$1</h2>


figcaption fixes

<img alt="(.*?)"(.*?)\n<figcaption>
<img alt="$1"$2\n<figcaption>$1

Figure (\d+.\d+)&nbsp;
Figure $1

0 comments on commit 451f375

Please sign in to comment.