diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-02-27 23:46:09 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-02-28 00:52:39 -0700 |
| commit | 8e573ac94f23e750480a6abb24fa79f0adf3e358 (patch) | |
| tree | 8e6b22611b962f07bce2f126a3d00a82a0cf47ab /lib | |
| parent | 7df3cc567dd0cc7f0e4eced0d88fef2f1808f434 (diff) | |
if path is included both partially and fully, store it with true value (included fully) in includes table of document catalog
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/reader.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor/reader.rb b/lib/asciidoctor/reader.rb index f6dcfed8..68b1573d 100644 --- a/lib/asciidoctor/reader.rb +++ b/lib/asciidoctor/reader.rb @@ -690,7 +690,7 @@ class PreprocessorReader < Reader # 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 + @includes[path.slice 0, (path.rindex '.')] ||= attributes['partial-option'] ? nil : true end else @dir = '.' @@ -698,7 +698,7 @@ class PreprocessorReader < Reader @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 + @includes[Helpers.rootname path] ||= attributes['partial-option'] ? nil : true else @path = '<stdin>' end |
