A block-level image must be preceded and followed by a blank line or another block-level image. Block-level images support click-to-zoom.
favicon
Inline image:
Tables
Header
Default
Left
Center
Right
Code Blocks
Code blocks are highlighted using shiki + @vscode/vscode-languagedetection.
TypeScript
import{hook}from '../hooks';import type{Article}from './article';const tags = new Map<string, Tag>();export class Tag{ /** Get all tags */ static getAll(): Tag[]{ return tags.values().toArray();} /** Set article tag */ static setArticle(name: string, article: Article): Tag{ let tag = tags.get(name); if(!tag){ tag = new Tag(name); tags.set(name, tag); hook('tag:add', tag);} tag.#articles.add(article); hook('tag:update', tag); return tag;} #name: string; #articles = new Set<Article>(); constructor(name: string){ this.#name = name;} /** Tag name */ get name(){ return this.#name;} /** Get all articles for the tag */ getArticles(): Article[]{ return this.#articles.values().toArray();} /** Remove article from tag */ removeArticle(article: Article){ this.#articles.delete(article); hook('tag:update', this); if(this.#articles.size>0)return; tags.delete(this.#name); hook('tag:remove', this);} /** Whether the tag is destroyed */ get destroyed(): boolean{ return tags.get(this.#name) !== this;}}
Can be nested
Supports block-level syntaxJavaScript
console.log('Hello world!');
Math
Inline math: E=mc2
Block-level math:
$
E=mc^2\dfrac{1}{2}
$
Footnotes
This is an example of a basic footnote reference1. You can also reference the same footnote multiple times1, or reference different footnotes2.
An example of a footnote with complex formattingspecial.
If you hover over the footnote reference, you can preview it without navigating away!
1
Basic footnote content (a general description that can be referenced repeatedly)
2
Standalone footnote content
special
Footnote with complex formatting:
Block-level syntax is supported here, like code blocks.
Now, code blocks in the preview also support one-click copy!
JavaScript
::: Tab 1Content of the first tab.::: Tab 2Content of the second tab.::: *Markdown* syntax is supported in the tab label```mdTab content supports block-level *Markdown* syntax```:::
Fold
Click to expand for details
Block-level syntax can be used here:
JavaScript
console.log('Hello world!');
Markdown
+++ Click to expand for detailsBlock-level syntax can be used here:```jsconsole.log('Hello world!');```+++
Note
注意
Information you should be aware of.
提示
A helpful tip.
警告
Important information that requires immediate attention.
危险
Advice about potential risks or negative outcomes from certain actions.
Markdown
!!! infoInformation you should be aware of.!!!!!! tipA helpful tip.!!!!!! warnImportant information that requires immediate attention.!!!!!! dangerAdvice about potential risks or negative outcomes from certain actions.!!!