Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When resolving a reference like paragraph (i) and we happen to be in PARA (i), don't link to ourselves #2286

Open
longhotsummer opened this issue Nov 18, 2024 · 2 comments

Comments

@longhotsummer
Copy link
Contributor

It's highly likely to be wrong.

@goose-life
Copy link
Contributor

@longhotsummer longhotsummer self-assigned this Nov 29, 2024
@longhotsummer
Copy link
Contributor Author

longhotsummer commented Nov 29, 2024

This is complicated. We have to first find the closest (semi-) hierarchical element that contains the citing text, and then exclude that, but only if there are no child references.

For example, if we're in section 1, we don't want to ignore section 1 in the reference section 1(a).

We also don't want to get confused in this case: if we're in section 2 > subsection (i) > para (a) > subpara (i) we don't want to ignore subsection (i) because we're inside subpara (i).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants