Markdown
Markdown (Lightweight Markup Language)
A plain-text formatting syntax that uses simple punctuation marks like #, *, and - to define headings, emphasis, lists, and links, designed to be both easy to write and readable without rendering.
技術的詳細
Markdown was created by John Gruber in 2004 as a text-to-HTML conversion tool. CommonMark (2014) standardized the ambiguous parts of the original specification. GitHub Flavored Markdown (GFM) adds tables, task lists, strikethrough, and autolinks. Parsers (marked, markdown-it, remark) convert Markdown to HTML AST. Extensions include math (KaTeX/MathJax via $$), diagrams (Mermaid), footnotes, and front matter (YAML metadata). Markdown is widely used for documentation (README files), static site generators, note-taking apps, and content management systems.
例
```javascript
// Markdown: web API example
const response = await fetch('/api/resource');
const data = await response.json();
console.log(data);
```