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

fix: ignore cross reference conversion in examples #332

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

dandhlee
Copy link
Collaborator

Bigframes team saw that cross references were converting their example code content, see https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.session.Session#bigframes_session_Session_read_gbq. The conversion for cross references don't work in code content, temporarily fixing this for Bigframes team's example.

I've filed #331 to follow up to ensure that code content gets properly converted into links. Until then, for example content found in the summary, they won't get converted into xrefs.

Fixes b/306420925.

  • Tests pass

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Oct 31, 2023
@dandhlee dandhlee marked this pull request as ready for review October 31, 2023 22:42
@dandhlee dandhlee requested review from a team as code owners October 31, 2023 22:42
Copy link

@dansaadati dansaadati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# If the reference is found after example section, ignore it.
if uid and (
not ignore_examples or
(ignore_examples and index < example_index)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, as long as there cannot be content after the example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples: is only used by the bigframes team and it's their last content in the summary.

@dandhlee dandhlee merged commit bbfa011 into main Nov 1, 2023
7 checks passed
@dandhlee dandhlee deleted the fix_cross_reference_conversion branch November 1, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants