-
Notifications
You must be signed in to change notification settings - Fork 86
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
Use heading text for references to heading even across pages #1116
Conversation
| Some (`Label (_, lbl)) -> Some lbl.Component.Label.text | ||
| None -> None | ||
in | ||
identifier ?text id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this last commit fix a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface for Ref_tools.resolve_reference
was changed to also return a paragraph option
: the "paragraph"1 is a possible replacement text computed when resolving the reference. In the case of a title, this "paragraph" is the title.
However, before the last commit, this paragraph was not always output as Some
by resolve_reference
, so there was some code in Link
which looked for the title content in the missing case.
In short, the last commit does not fix a bug, it just moves this lookup of title content from Link.comment_inline_element
to Ref_tools.resolve_reference
so that the lookup of the title content is centralized in one place.
Footnotes
-
paragraph
here is just a type alias forinline_element with_location list
. Not an actual paragraph. ↩
Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
Signed-off-by: Paul-Elliot <peada@free.fr>
This seems fine, as far as it goes. At some point I think it'd be good if In any case, this is a step in the right direction and fixes some bugs, so in it goes. Thanks! |
Fix #941 and #779.