improve footnote reference and text alignment so footnotes from other cases do not appear #2063
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.
adjust and expand on case footnote ref/text matching logic in attempt to correctly match up refs and footnote texts.
The general approach is to try to use csae index to align footnote refs with texts, only relying the data available within the last export stage (docx stage).
attempts to find which case each footnote ref and text belong to by alignging with closest document string position of case title, reference text and footnote text.
corrects missing node_id variable (was previously always empty) and adjusts mark_text to include casebook index. These 2 variables are used to align refs and texts together.
checks for footnote text elision marker and forces removal of corresponding footnote ref when found.
Note: there is an empirically found magic number of 1000 when looking for first real reference of case title.