Skip to content

fix: replace HTML flag headers with markdown to prevent emdash rendering#29325

Open
nikki-ef wants to merge 1 commit intobazelbuild:masterfrom
nikki-ef:fix-flag-emdash-rendering
Open

fix: replace HTML flag headers with markdown to prevent emdash rendering#29325
nikki-ef wants to merge 1 commit intobazelbuild:masterfrom
nikki-ef:fix-flag-emdash-rendering

Conversation

@nikki-ef
Copy link
Copy Markdown

@nikki-ef nikki-ef commented Apr 17, 2026

Summary

  • Flag names like --verbose on the flag cheatsheet are rendered with an emdash (—) instead of double dashes (--) due to Mintlify's smart typography converting -- in prose contexts
  • Replaced <h3><code><a> HTML wrappers with markdown inline code links ([`--flag`](url)) for all 27 flags in docs/reference/flag-cheatsheet.mdx
  • Hyperlinks to the command-line reference are preserved
  • Mintlify preview: https://bazel-pr-29325.mintlify.app/reference/flag-cheatsheet

Fixes bazel-contrib/bazel-docs#366

Test plan

  • Verify on Mintlify preview that flag names render with -- (not —)
  • Verify flag names are still clickable links to the command-line reference

🤖 Generated with Claude Code

@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Apr 17, 2026
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 17, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Flag names like `--verbose` on the flag cheatsheet were rendered with an
emdash (—) instead of double dashes (--) due to Mintlify's smart
typography converting `--` in prose contexts.

Replace `<h3><code><a>` HTML wrappers with markdown inline code links
for all 27 flags in the cheatsheet. Hyperlinks are preserved.

Fixes bazel-contrib/bazel-docs#366
@nikki-ef nikki-ef force-pushed the fix-flag-emdash-rendering branch from 2c93fd8 to 5655d48 Compare April 17, 2026 17:56
@iancha1992 iancha1992 added type: documentation (cleanup) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website team-Documentation Documentation improvements that cannot be directly linked to other team labels labels Apr 17, 2026
@fweikert fweikert self-requested a review April 17, 2026 20:18
Copy link
Copy Markdown
Member

@fweikert fweikert left a comment

Choose a reason for hiding this comment

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

One downside of this change is that we can no longer link to individual flags on this page (since the anchors are being removed). I'm not sure how widely this feature is being used, so for now I'm fine with merging it.

@fweikert fweikert added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally labels Apr 17, 2026
Copy link
Copy Markdown
Member

@fweikert fweikert left a comment

Choose a reason for hiding this comment

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

Ok, I spoke too soon - this change actually breaks the right NavBar on Mintlify. I think we need to keep the h3 tags and just replace <code>/ </code> with triple backticks.

@nikki-ef
Copy link
Copy Markdown
Author

Ok, I spoke too soon - this change actually breaks the right NavBar on Mintlify. I think we need to keep the h3 tags and just replace <code>/ </code> with triple backticks.

Ah I see the issue. I'll push a fix. Thanks for taking a look!

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

Labels

team-Documentation Documentation improvements that cannot be directly linked to other team labels team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: documentation (cleanup)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flag cheatsheet: -- rendered as emdash

3 participants