diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-02-18 20:46:41 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-18 20:46:41 +0300 |
| commit | cb77d520bfd163ee8a63e8158bccb6b237df85fe (patch) | |
| tree | 0ef0659100375ac6828a10d3ea171ff585ca3fde /spec/fixtures | |
| parent | b85e4497c5bd7dd25d38b85ec6c4755eddb7bdb1 (diff) | |
resolves #47 stop requiring specific include file scheme (PR #302)
support conversion of article documents to a single-chapter file
resolves #205 support special chapters like bibliography
resolves #190 `basedir` now points to spine document directory when processing chapter files
resolves #178 fix image and listing numbers being reset in each chapter
resolves #166 fix xref resolving between sub-includes of chapter files
resolves #151 add support for contentless include files
resolves #136 drop nonstandard `<<chapter#>>` xref syntax and instead support vanilla `<<anchor>>` or `<<file#anchor>>` syntax
resolves #206 properly include bibliography generated by asciidoctor-bibtex
require Asciidoctor 1.5.6+
Diffstat (limited to 'spec/fixtures')
| -rw-r--r-- | spec/fixtures/bibliography-chapter/bibliography.adoc | 7 | ||||
| -rw-r--r-- | spec/fixtures/bibliography-chapter/book.adoc | 7 | ||||
| -rw-r--r-- | spec/fixtures/bibliography-chapter/chapter.adoc | 4 | ||||
| -rw-r--r-- | spec/fixtures/diagram/book.adoc | 3 | ||||
| -rw-r--r-- | spec/fixtures/inline-anchor-xref/chapter.adoc | 4 | ||||
| -rw-r--r-- | spec/fixtures/inter-chapter-xref/chapter-a.adoc | 2 | ||||
| -rw-r--r-- | spec/fixtures/inter-subchapter-xref/book.adoc | 8 | ||||
| -rw-r--r-- | spec/fixtures/inter-subchapter-xref/chapter-a.adoc | 3 | ||||
| -rw-r--r-- | spec/fixtures/inter-subchapter-xref/chapter-b.adoc | 3 | ||||
| -rw-r--r-- | spec/fixtures/inter-subchapter-xref/subchapter-a.adoc | 3 | ||||
| -rw-r--r-- | spec/fixtures/inter-subchapter-xref/subchapter-b.adoc | 3 | ||||
| -rw-r--r-- | spec/fixtures/invalid.adoc | 3 | ||||
| -rw-r--r-- | spec/fixtures/listing-chapter/book.adoc | 8 | ||||
| -rw-r--r-- | spec/fixtures/listing-chapter/chapter-a.adoc | 6 | ||||
| -rw-r--r-- | spec/fixtures/listing-chapter/chapter-b.adoc | 6 | ||||
| -rw-r--r-- | spec/fixtures/minimal/chapter.adoc | 1 |
16 files changed, 66 insertions, 5 deletions
diff --git a/spec/fixtures/bibliography-chapter/bibliography.adoc b/spec/fixtures/bibliography-chapter/bibliography.adoc new file mode 100644 index 0000000..4eb6baa --- /dev/null +++ b/spec/fixtures/bibliography-chapter/bibliography.adoc @@ -0,0 +1,7 @@ +[bibliography] += Bibliography + +- [[[pp]]] Andy Hunt & Dave Thomas. The Pragmatic Programmer: +From Journeyman to Master. Addison-Wesley. 1999. +- [[[gof,2]]] Erich Gamma, Richard Helm, Ralph Johnson & John Vlissides. Design Patterns: +Elements of Reusable Object-Oriented Software. Addison-Wesley. 1994. diff --git a/spec/fixtures/bibliography-chapter/book.adoc b/spec/fixtures/bibliography-chapter/book.adoc new file mode 100644 index 0000000..e1f9a5b --- /dev/null +++ b/spec/fixtures/bibliography-chapter/book.adoc @@ -0,0 +1,7 @@ += Bibliography chapter book +:doctype: book +:idprefix: + +include::chapter.adoc[leveloffset=+1] + +include::bibliography.adoc[leveloffset=+1] diff --git a/spec/fixtures/bibliography-chapter/chapter.adoc b/spec/fixtures/bibliography-chapter/chapter.adoc new file mode 100644 index 0000000..8a43606 --- /dev/null +++ b/spec/fixtures/bibliography-chapter/chapter.adoc @@ -0,0 +1,4 @@ += Chapter + +_The Pragmatic Programmer_ <<pp>> should be required reading for all developers. +To learn all about design patterns, refer to the book by the "`Gang of Four`" <<gof>>. diff --git a/spec/fixtures/diagram/book.adoc b/spec/fixtures/diagram/book.adoc index a25e582..c64f816 100644 --- a/spec/fixtures/diagram/book.adoc +++ b/spec/fixtures/diagram/book.adoc @@ -1,7 +1,6 @@ = Diagrams book :doctype: book -// TODO: https://github.com/asciidoctor/asciidoctor-epub3/issues/190 -// :plantumlconfig: ./plantuml.cfg +:plantumlconfig: ./plantuml.cfg include::subdir/chapter.adoc[leveloffset=+1] diff --git a/spec/fixtures/inline-anchor-xref/chapter.adoc b/spec/fixtures/inline-anchor-xref/chapter.adoc index c0352b9..475465b 100644 --- a/spec/fixtures/inline-anchor-xref/chapter.adoc +++ b/spec/fixtures/inline-anchor-xref/chapter.adoc @@ -1,6 +1,6 @@ = Chapter -* [[item1]]foo::bar -* [[item2]]baz::qux +[[item1]]foo::bar +[[item2]]baz::qux Try to refer to <<item1>>. diff --git a/spec/fixtures/inter-chapter-xref/chapter-a.adoc b/spec/fixtures/inter-chapter-xref/chapter-a.adoc index 738dbd2..af4b89c 100644 --- a/spec/fixtures/inter-chapter-xref/chapter-a.adoc +++ b/spec/fixtures/inter-chapter-xref/chapter-a.adoc @@ -3,4 +3,4 @@ This is chapter A. There's not much too it. -Time to move on to <<chapter-b#>>. +Time to move on to <<chapter-b>>. diff --git a/spec/fixtures/inter-subchapter-xref/book.adoc b/spec/fixtures/inter-subchapter-xref/book.adoc new file mode 100644 index 0000000..554c1d8 --- /dev/null +++ b/spec/fixtures/inter-subchapter-xref/book.adoc @@ -0,0 +1,8 @@ += Book Title +:doctype: book +:idprefix: +:idseparator: - + +include::chapter-a.adoc[leveloffset=+1] + +include::chapter-b.adoc[leveloffset=+1] diff --git a/spec/fixtures/inter-subchapter-xref/chapter-a.adoc b/spec/fixtures/inter-subchapter-xref/chapter-a.adoc new file mode 100644 index 0000000..05d3149 --- /dev/null +++ b/spec/fixtures/inter-subchapter-xref/chapter-a.adoc @@ -0,0 +1,3 @@ += Chapter A + +include::subchapter-a.adoc[leveloffset=+1] diff --git a/spec/fixtures/inter-subchapter-xref/chapter-b.adoc b/spec/fixtures/inter-subchapter-xref/chapter-b.adoc new file mode 100644 index 0000000..c834622 --- /dev/null +++ b/spec/fixtures/inter-subchapter-xref/chapter-b.adoc @@ -0,0 +1,3 @@ += Chapter B + +include::subchapter-b.adoc[leveloffset=+1] diff --git a/spec/fixtures/inter-subchapter-xref/subchapter-a.adoc b/spec/fixtures/inter-subchapter-xref/subchapter-a.adoc new file mode 100644 index 0000000..4953f23 --- /dev/null +++ b/spec/fixtures/inter-subchapter-xref/subchapter-a.adoc @@ -0,0 +1,3 @@ += Subchapter A + +Look at <<subchapter-b#anchor>>. diff --git a/spec/fixtures/inter-subchapter-xref/subchapter-b.adoc b/spec/fixtures/inter-subchapter-xref/subchapter-b.adoc new file mode 100644 index 0000000..720b5d3 --- /dev/null +++ b/spec/fixtures/inter-subchapter-xref/subchapter-b.adoc @@ -0,0 +1,3 @@ += Subchapter B + +[[anchor,label]]Anchors rock! diff --git a/spec/fixtures/invalid.adoc b/spec/fixtures/invalid.adoc new file mode 100644 index 0000000..0ffb786 --- /dev/null +++ b/spec/fixtures/invalid.adoc @@ -0,0 +1,3 @@ += Title + +<<nonexistent,xref to nowhere>> diff --git a/spec/fixtures/listing-chapter/book.adoc b/spec/fixtures/listing-chapter/book.adoc new file mode 100644 index 0000000..342754a --- /dev/null +++ b/spec/fixtures/listing-chapter/book.adoc @@ -0,0 +1,8 @@ += Listing chapter book +:doctype: book +:idprefix: +:idseparator: - + +include::chapter-a.adoc[leveloffset=+1] + +include::chapter-b.adoc[leveloffset=+1] diff --git a/spec/fixtures/listing-chapter/chapter-a.adoc b/spec/fixtures/listing-chapter/chapter-a.adoc new file mode 100644 index 0000000..2ae739d --- /dev/null +++ b/spec/fixtures/listing-chapter/chapter-a.adoc @@ -0,0 +1,6 @@ += Chapter A + +[title=.gitattributes] +---- +* -text +---- diff --git a/spec/fixtures/listing-chapter/chapter-b.adoc b/spec/fixtures/listing-chapter/chapter-b.adoc new file mode 100644 index 0000000..d5577b0 --- /dev/null +++ b/spec/fixtures/listing-chapter/chapter-b.adoc @@ -0,0 +1,6 @@ += Chapter B + +[title=.gitattributes] +---- +* -text +---- diff --git a/spec/fixtures/minimal/chapter.adoc b/spec/fixtures/minimal/chapter.adoc index e69de29..31b7fa2 100644 --- a/spec/fixtures/minimal/chapter.adoc +++ b/spec/fixtures/minimal/chapter.adoc @@ -0,0 +1 @@ += Chapter |
