Hướng dẫn công cụ
Về Xem trước Markdown
Markdown Preview render Markdown source thành preview dễ đọc để kiểm tra headings, lists, links, blockquotes, tables và code blocks.
Dùng trước khi gửi README, đoạn documentation, issue hoặc blog draft.
Cách dùng Markdown Preview
- Dán Markdown source.
- Dùng sample để kiểm tra GFM tables, fenced code blocks và links.
- Xem lại heading hierarchy, list indentation và link rendering.
Khi nào nên dùng
- Kiểm tra language của code blocks và table alignment trong README trước khi commit.
- Preview GitHub issue hoặc release note trước khi đăng.
- Inspect snippets tài liệu API cho headings và nested lists.
Markdown syntax và formatting traps
Markdown nhẹ, nhưng blank lines, indentation và số backticks ảnh hưởng rendering. GitHub Flavored Markdown thêm tables, task lists và fenced code blocks.
- Headings dùng # và nên theo logical hierarchy.
- Nested lists phụ thuộc indentation; trộn tabs và khoảng trắng dễ làm vỡ layout.
- Fenced code blocks dùng triple backticks và có thể thêm language name.
- Link văn bản nên mô tả rõ, không chỉ “click here”.
Câu hỏi thường gặp về Xem trước Markdown
- Có hỗ trợ GitHub Flavored Markdown không?
- Common GFM features như tables, fenced code blocks và task lists có thể preview, nhưng rendering cuối phụ thuộc target platform.
- Vì sao nested list lỗi?
- Thường do indentation hoặc blank lines. Indent child list items sâu hơn parent và giữ marker style nhất quán.
- Content có bị upload không?
- Không. Markdown rendering chạy cục bộ trong trình duyệt và không upload lên wetool.site.
Markdown Preview và publishing
Preview bắt được nhiều formatting issues, nhưng GitHub, npm, forums và CMS có thể dùng Markdown extensions và sanitizers khác. Hãy kiểm tra lại trên target platform trước khi publish.
So sánh Markdown dialect
Preview tool giúp tìm structure issues, nhưng Markdown dialect khác nhau giữa các platform.
- CommonMark bao phủ baseline syntax như headings, paragraphs, lists, blockquotes và code blocks.
- GitHub Flavored Markdown thêm common extensions như tables, task lists, strikethrough và autolinks.
- Blogs, CMS và documentation sites có thể thêm front matter, heading anchors, footnotes hoặc math formulas.
Safe rendering và ranh giới publishing
Markdown preview không phải final publishing environment, đặc biệt với HTML, images, external links và platform filters.
- Không xem untrusted Markdown là safe HTML; target platforms thường sanitize raw HTML.
- External images và links có thể lộ yêu cầu sources, token parameters hoặc internal addresses sau publishing.
- Trước khi publish README, npm docs hoặc CMS pages, hãy kiểm tra final rendering trên target platform.