Fix missing cross references on newly saved file #13066
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intent
Address #12882 for newly saved files
Approach
Fixing another issue from a newly saved file. The cross reference index is generated for a rendered file after the file is saved without performing the indexing. The newer rendered index is preferred over performing the index on the saved file causing no cross references.
Since the rendered cross reference index is not populated with data, it can be size checked to determine if the saved file needs the cross references indexed. For a file that actually has no cross references, this rendered index would have a non-zero file size.
Reordered the index check to short circuit the expression check in this order: rendered index does not exist, rendered index has no content, file index is newer than rendered index
Automated Tests
None
QA Notes
Steps to reproduce:
Documentation
None
Checklist
NEWS.md