Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: Markdown generation discards content inside Tabs components

Đang mở
#4,063 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@manueldezman đang làm issue này rồi.

Từ ngày 18/8/2026.

  • #4080 của @manueldezman — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
75/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
markdown
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với src/pages/[...path].md.ts để lần theo route Markdown công khai đến transformPageToMarkdown(), sau đó kiểm tra src/lib/markdown/transformMarkdown.ts, đặc biệt là quy tắc dọn dẹp quanh các dòng 211–224 và các component handler hiện có. Giữ nguyên tuần tự từng nhãn và panel của Tabs trong Markdown được tạo ra, xử lý các component lồng nhau như CodeSample và thêm các test xác nhận rằng toàn bộ nội dung của tất cả các tab vẫn còn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug triage
Describe the bug

The generated .md pages omit content placed inside interactive Tabs components, creating content-parity differences between the rendered documentation and the agent-facing Markdown representation.

After previously documenting the affected pages in an agent experience audit, I encountered a similar parity issue in another documentation project. Investigating that project revealed a serialization problem, so I examined Chainlink's Markdown-generation pipeline for a comparable cause.

Chainlink's public .md route is implemented in:

src/pages/[...path].md.ts

The route reads the source MDX and passes it to transformPageToMarkdown(). The conversion logic is implemented in:

src/lib/markdown/transformMarkdown.ts

The transformer provides handlers for selected MDX components, including Aside, CodeSample, and CcipCommon. However, it does not provide a serialization handler for Tabs, TabsContent, or their slotted Fragment children.

The cleanup rule subsequently removes unsupported MDX flow components:

[transformMarkdown.ts, lines 211–224]
(https://github.com/smartcontractkit/documentation/blob/main/src/lib/markdown/transformMarkdown.ts#L211-L224)

Image

When a Tabs component is removed, its Fragment panels and their commands, tables, code samples, warnings, and expected outputs are removed with it.

For example, this source structure:

<Tabs client:visible>
  <Fragment slot="tab.1">Starter kit</Fragment>
  <Fragment slot="tab.2">Manual</Fragment>

  <Fragment slot="panel.1">
    Starter-kit instructions
  </Fragment>

  <Fragment slot="panel.2">
    Manual instructions
  </Fragment>
</Tabs>

produces a Markdown representation containing neither implementation path.

To Reproduce
  1. Open the rendered LockRelease Token Pool documentation page:
    https://docs.chain.link/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool

  2. Navigate to Step 1: Deploy the LockRelease Token Pool.

  3. Confirm that the page contains Starter kit and Manual tabs with deployment instructions.

  4. Open the corresponding Markdown page:
    https://docs.chain.link/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool.md

  5. Locate the same Step 1 section.

  6. Observe that the Markdown moves from the introductory paragraph directly to Transfer-fee fields, omitting both tab panels.

  7. Inspect the source MDX:
    https://github.com/smartcontractkit/documentation/blob/main/src/content/ccip/tutorials/canton/cross-chain-tokens/lock-release-token-pool.mdx

  8. Inspect the unsupported-component cleanup rule:
    https://github.com/smartcontractkit/documentation/blob/main/src/lib/markdown/transformMarkdown.ts#L211-L224

URLs

Representative page:

Expected behavior

The Markdown transformer should preserve every tab label and its corresponding panel content.

Because Markdown is not interactive, each tab could be serialized sequentially as a labeled section. Nested components, such as CodeSample, should then be processed by their existing handlers.

No tab panel should be silently discarded.

Additional context

All affected pages are documented here: https://github.com/manueldezman/chainlink-documentation-audit.

I would be happy to submit a focused PR that adds serialization support for Tabs, TabsContent, and their Fragment panels, along with automated tests confirming that every tab label and panel remains present in the generated Markdown.

Ngôn ngữ chính
MDX
Star
527
Fork
480
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
111

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của smartcontractkit/documentation

Tất cả issue của smartcontractkit/documentation

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.