Visitar URL original
docs: correct the adev writing guide skill by erkamyaman 路 Pull Request #70838 路 angular/angular 路 GitHub
The Wayback Machine - https://web.archive.org/web/20260922203634/https://github.com/angular/angular/pull/70838
Skip to content

docs: correct the adev writing guide skill - #70838

Open
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:docs-fix-adev-writing-guide-skill
Open

erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:docs-fix-adev-writing-guide-skill

Conversation

@erkamyaman

Copy link
Copy Markdown
Contributor

Changes in file order, each with what makes it wrong today:

  • Mermaid: <docs-code language="mermaid"> is not supported, since mermaid is
    not registered with Shiki and only the fenced path short-circuits before
    highlighting.
  • Attributes lead-in: header and highlight take a value after a colon while
    the rest are bare flags, so linenums: true fails the build.
  • header: "Title": the rule is /header\s*:\s*(['"])(.*?)\1/, so the documented header="Title"` leaves residue and throws.
  • highlight: [2]: same colon rule, and an ascending two-number array is an
    inclusive range, so [12, 19] is lines 12 through 19.
  • hideDollar: the tokenizer has always accepted it and the list omitted it.
  • Example fence: its highlight="[2]" throws Invalid code block metadata.
  • <docs-code> lead-in: this element uses attr="value" with double quotes and
    validates nothing, the opposite of the fenced form.
  • language: when omitted it is guessed from the file extension and anything
    unrecognized falls back to angular-ts.
  • highlight on the element: same range semantics as the fenced form.
  • diff: removed from the element in Assorted improvements to code snippet generation聽#65448, with no rule and no usage left.
  • preview: renders a running component, not a StackBlitz link, which is
    disabled in the viewer.
  • hideDollar, prefer/avoid: parsed by the element but undocumented.
  • TODO:: the alert tokenizer builds one regex requiring a colon for every
    keyword.
  • Cards, container: a bare card renders on its own, and 8 of 141 cards in adev
    are written that way.
  • Cards, attributes: imgSrc, iconImgSrc and titleInline are parsed and in
    use.
  • Cards, href vs link: href is the destination and link is only the
    "Learn more" label, so a URL in link renders as text.
  • Videos: the extension reads src and title; there has never been an alt.

The skill documents code block metadata as `header="Title"` and
`highlight="[1, 3-5]"`, but the tokenizer has only ever read the
`key: value` form. Since 7bbe263 that mismatch is fatal rather than
silent, so a guide written to the skill's own example now fails the
build with `Invalid code block metadata`. That change did not update
this file.

Correct the metadata syntax and document the `highlight` range
semantics and the `hideDollar` flag. Drop the `<docs-code>` `diff`
attribute, removed in 8ec0a4e, and stop describing `preview` as a
StackBlitz link, which is disabled. Add the attributes `<docs-code>`
and `<docs-card>` accept, correct `<docs-video>` to `title` rather
than `alt`, which the extension has never read, and note that mermaid
works only in a fenced block.
@pullapprove
pullapprove Bot requested a review from kirjs September 20, 2026 22:48
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Sep 20, 2026
@ngbot ngbot Bot added this to the Backlog milestone Sep 20, 2026
Comment thread .agent/skills/adev-writing-guide/SKILL.md
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 22, 2026
@JeanMeche
JeanMeche removed the request for review from kirjs September 22, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: docs Related to the documentation target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants