Skip to content

docs(bigquery): fix table rendering in markdown docs - #18294

Open
shuoweil wants to merge 3 commits into
mainfrom
shuowei-fix-bigquery-docs-table-format
Open

docs(bigquery): fix table rendering in markdown docs#18294
shuoweil wants to merge 3 commits into
mainfrom
shuowei-fix-bigquery-docs-table-format

Conversation

@shuoweil

@shuoweil shuoweil commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This monkeypatch is an isolated workaround in docs/conf.py while a permanent upstream fix is not scheduled in gcp-sphinx-docfx-yaml.

Fixes table formatting in the generated Markdown reference documentation for google-cloud-bigquery.
When building Markdown documentation via sphinx-markdown-builder, table cell paragraphs unconditionally emit trailing newlines. This breaks single-line GitHub Flavored Markdown (GFM) table rows, causing cell padding to be interpreted as 4-space indented code blocks on reference doc pages.

This change adds a targeted patch in docs/conf.py that suppresses newlines when exiting paragraphs inside table cells, restoring valid GFM table syntax.

before: screen/3oup25c57irb8
after: screen/4GqUXF7gs4p6GZV (render locally with nox -s doxfx)

Fixes #<522853190> 🦕

@shuoweil
shuoweil requested review from a team as code owners September 4, 2026 19:26
@shuoweil
shuoweil requested review from Edvc97, sycai and tswast and removed request for a team September 4, 2026 19:26
@shuoweil shuoweil self-assigned this Sep 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a workaround in docs/conf.py to suppress trailing newlines in table cells generated by sphinx-markdown-builder, preserving valid GFM tables. It also adds a unit test to verify that docs/conf.py executes successfully. The reviewer recommended gracefully skipping this new unit test if docs/conf.py is not found, which can happen when tests are run against an installed package where the docs/ directory is absent.

Comment thread packages/google-cloud-bigquery/tests/unit/test_docs.py
shuoweil and others added 2 commits September 4, 2026 12:39
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant