Support Markdown tables in notes and guides

Đang mở
#38 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

Chưa có ai nhận issue này.

Đá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
78/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
content

Hướng nghiên cứu

Start with SAFE_MDX_OPTIONS in src/lib/mdx-safe.ts and NoteBody in src/components/note-body.tsx to trace how notes and guides are rendered and sanitized. Then review src/components/mdx-components.tsx, src/lib/mdx-safe.test.ts, and the content guide. Done when tables compile, raw HTML in cells remains rejected, wide tables scroll within their container on phones, and the guide documents the syntax.

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

Mô tả

enhancement help wanted

Problem

Notes and guides cannot use Markdown tables. The content guide says: "Tables need a plugin that is not installed yet, so avoid them for now." Tables are useful in study notes, for example to compare data structures or complexity.

Where it happens

Notes (/dashboard/...) and guides (/guides/...) render through NoteBody in src/components/note-body.tsx, using SAFE_MDX_OPTIONS from src/lib/mdx-safe.ts. That file also rejects raw HTML, JSX, and {expressions} for safety.

Suggested approach

  1. Add remark-gfm to remarkPlugins in SAFE_MDX_OPTIONS, keeping remarkRejectJsx.
  2. Style tables in src/components/mdx-components.tsx. Wide tables must scroll inside their own container on a phone instead of widening the page.
  3. Add tests to src/lib/mdx-safe.test.ts: a table compiles, and raw HTML inside a table cell is still rejected.
  4. Update the content guide to explain table syntax and remove the "avoid tables" line.

remark-gfm also enables strikethrough, task lists, footnotes, and autolinks. Mention in the pull request which of these you checked.

Check your change

npm run lint
npm run typecheck
npm test
npm run build
npm run e2e

Please comment with your plan before starting, since this touches the content security pipeline.

Ngôn ngữ chính
TypeScript
Star
1
Fork
1
Merge trung bình
8 giờ 58 phút
Pull request đã merge (30 ngày)
37

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 procoderji-com/procoderji

Tất cả issue của procoderji-com/procoderji

Issue tương tự

Thêm issue về TypeScript

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.