Support Markdown tables in notes and guides
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 78/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- next.js, react, typescript
- 領域
- content
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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
- Add
remark-gfmtoremarkPluginsinSAFE_MDX_OPTIONS, keepingremarkRejectJsx. - Style tables in
src/components/mdx-components.tsx. Wide tables must scroll inside their own container on a phone instead of widening the page. - Add tests to
src/lib/mdx-safe.test.ts: a table compiles, and raw HTML inside a table cell is still rejected. - 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.
- 主要語言
- TypeScript
- 星號
- 1
- 分支
- 1
- 平均合併
- 8 小時 58 分鐘
- 30 天內合併 PR
- 37
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
procoderji-com/procoderji 的其他 Issue
-
area:frontend bug
難度 2/5 1-3 小時 新手友好度 62/100
procoderji-com/procoderji#104 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 88/100
procoderji-com/procoderji#36 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 1/5 1-3 小時 新手友好度 85/100
procoderji-com/procoderji#35 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 1/5 1-3 小時 新手友好度 79/100
procoderji-com/procoderji#34 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 1/5 1-3 小時 新手友好度 90/100
procoderji-com/procoderji#33 ·
維護者通常 1 天內回覆
查看 procoderji-com/procoderji 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
bug platform-android
難度 2/5 1-3 小時 新手友好度 68/100
Termix-SSH/Mobile#146 · 1 則留言 ·
維護者通常 2 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 66/100
devswha/herdr-web-ui#3875 ·
-
難度 1/5 1 小時以內 新手友好度 88/100
-
area: runtime chore cli consistency dependencies developer-experience difficulty: easy discovery documentation enhancement good first issue help wanted hygiene json-output packaging priority: P3 tests version
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆