summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/reader.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asciidoctor/reader.rb b/lib/asciidoctor/reader.rb
index 7767cad2..6d0708cc 100644
--- a/lib/asciidoctor/reader.rb
+++ b/lib/asciidoctor/reader.rb
@@ -690,6 +690,7 @@ class PreprocessorReader < Reader
@path = (path ||= ::File.basename file)
# only process lines in AsciiDoc files
if (@process_lines = file.end_with?(*ASCIIDOC_EXTENSIONS.keys))
+ # NOTE registering the include with a nil value tracks it while not making it visible to interdocument xrefs
@includes[path.slice 0, (path.rindex '.')] = attributes['partial-option'] ? nil : true
end
else
@@ -697,6 +698,7 @@ class PreprocessorReader < Reader
# we don't know what file type we have, so assume AsciiDoc
@process_lines = true
if (@path = path)
+ # NOTE registering the include with a nil value tracks it while not making it visible to interdocument xrefs
@includes[Helpers.rootname path] = attributes['partial-option'] ? nil : true
else
@path = '<stdin>'