diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-04-19 14:04:50 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-19 14:04:50 -0600 |
| commit | 4fd6cc84c7d964fa14a6789cf0042444472087fc (patch) | |
| tree | 318018a604b496b39fc5785b134f68013a274df8 /test/reader_test.rb | |
| parent | cbf44e6ad471f9520af69353174f7a68ac03c9ed (diff) | |
resolves #2200 don't convert inter-document xref to internal anchor if target included partially (PR #2686)
- change the includes key in the document catalog from a Set to a Hash
- don't track file included into the current file if included partially (partial-option attribute is set)
- don't track file included into the current file unless it's AsciiDoc
Diffstat (limited to 'test/reader_test.rb')
| -rw-r--r-- | test/reader_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/reader_test.rb b/test/reader_test.rb index ae65b07d..10b37066 100644 --- a/test/reader_test.rb +++ b/test/reader_test.rb @@ -589,6 +589,18 @@ include::fixtures/include-file.asciidoc[] doc = document_from_string input, :safe => :safe, :header_footer => false, :base_dir => DIRNAME output = doc.convert assert_match(/included content/, output) + assert doc.catalog[:includes]['fixtures/include-file'] + end + + test 'should not track include in catalog for non-AsciiDoc include files' do + input = <<-EOS +---- +include::fixtures/circle.svg[] +---- + EOS + + doc = document_from_string input, :safe => :safe, :header_footer => false, :base_dir => DIRNAME + assert doc.catalog[:includes].empty? end test 'include directive should resolve file with spaces in name' do |
