-
Notifications
You must be signed in to change notification settings - Fork 601
feat(docs): add --link and --no-link to docs format #684
Copy link
Copy link
Closed
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Motivation
gog docs format --match "X" --bold --italicworks today; the missing--link <url>is the same shape (UpdateTextStyle withtextStyle.link,fields=link). The brace DSL ingog docs sed({u=https://...}) covers it, but users discoveringformatfirst reasonably expect a flag.Verified against current source:
DocsFormatFlagsininternal/cmd/docs_format.goenumerates bold/italic/underline/strike/font-family/font-size/text-color/bg-color/alignment/line-spacing/heading-level/named-style — no link.Repro
Proposed surface
Acceptance criteria
--link https://...emits one UpdateTextStyle request withtextStyle.link.urlandfields=link.--link #heading-slugresolves the slug against doc headings (same code path as the existing[text](#slug)markdown anchor resolver, Drive markdown converter: resolve [text](#slug) to heading IDs instead of leaving raw fragment #633) and writestextStyle.link.headingId.--link mailto:foo@bar.comwrites a mailto link (separate from the Person-chip path).--no-linkclears the link by settingtextStyle.link=nullandfields=link.--linkand--no-linkare mutually exclusive.References