FunnyMonkey/FunnyMonkey-EPUB-Package — pull request #5 by neochief (2013-11-13 14:35:42+00:00)
Title: Added ability to create hierarchical TOC

Right now, the lib creates only flat navigational structure. There's no way to build a tree.

This pull requests allows to pass a $depth parameter to spineAddItemRef() function, which is used to build tree-like navMap later on.

Here's example of what it allows to accomplish:

```

...

Design Patterns

Praise for Design Patterns

Introduction to Design Patterns

Creational patterns

Abstract Factory

...
```

And of course, if you don't pass anything, it still produces valid flat navigation.