---
tags: misskey
---
# Table of Contents
Block syntax:
- [quote block](#quote)
- [search block](#search)
- [code-block](#code-block)
- [Math block](#math-block)
- [Centered block](#center)
Inline syntax:
- [shaky text](#big)
- [bold](#bold)
- [Discreet](#small)
- [italic](#italic)
- [Strikethrough](#strike)
- [Inline code](#inline-code)
- [Inline math](#math-inline)
- [Mention](#mention)
- [hashtag](#hashtag)
- [URL](#url)
- [link](#link)
- [Emoji code (custom emoji)](#emoji-code)
- [MFM function](#fn)
- [Unicode pictogram](#unicode-emoji)
- [Text](#text)
<h1 id="quote">Block: Quote block</h1>
## Format
````
> abc
>abc
>>nest
```
## Details
- Apply FullParser again to the quoted content.
- Ignore 0 to 1 spaces following `>`.
- Adjacent quoted lines will be united.
- Blank lines can be included in a multi-line quote.
- Blank lines after a quote are ignored. ([#61](https://github.com/misskey-dev/mfm.js/issues/61))
## Node
```js
{
type: 'quote',
children: [
{ type: 'text', props: { text: 'abc' }
]
}
````
<h1 id="search">Block: Search block</h2>
## Format.
```
How to write MFM Search
How to write MFM Search
How to write MFM [Search].
How to write MFM [Search].
```
## Details
- Search is not case-sensitive.
## Node
```js
{
type: 'search',
props: {
query: 'How to write MFM',
content: 'How to write MFM Search'
}
}
````
<h1 id="code-block">Block: Code block</h2>
## Format
<pre>
```
a
b``
```c
````
```
</pre>
<pre>
```js
abc
````
</pre>
## Details
- lang will be null if not specified.
## Node
```js
{
type: 'blockCode',
props: {
code: 'abc',
lang: 'js'
}
}
````
<h1 id="math-block">Block: Mathematical expression block</h2>
## Format
```
\[a = 1\]]
```
```
``\[
a = 2
a = 2\]
```
## Details
- `\[`must be at the beginning of a line.
- `\]` must be at the end of a line.
- Leading and trailing spaces and newlines will be trimmed.
## Node
```js
{
type: 'mathBlock',
props: {
formula: 'a = 1'
}
}
````
<h1 id="center">Block: Centered block</h2>
## format
```
<center>abc</center>
```
```
<center>
abc
</center>
```
## Details
- `<center>` must be at the beginning of a line.
- `</center>` must be at the end of a line.
- The content cannot be empty.
- InlineParser is applied to the content again.
## Node
```js
{
type: 'center',
children: [
{ type: 'text', props: { text: 'abc' }
]
}
````
<h1 id="big">Inline: shaky characters</h2>
**Deprecated syntax. An alternative syntax is provided. **
## Format.
````
***big!***
````
## Details
- InlineParser is applied to the content again.
- The content can also contain newlines.
## Node
```js
{
type: 'fn',
props: {
name: 'tada',
args: { }
},
children: [
{ type: 'text', props: { text: 'big!' }
]
}
````
<h1 id="bold">Inline: bold</h2>
## Format
Syntax 1:
```
**bold**.
```
Syntax 2:
```
__bold__
```
Syntax 3:
```
<b>bold</b>
```
## Details
- InlineParser is applied to the content again.
Syntax 1,3 only:
- All characters and newlines are allowed in the content.
Syntax 2 only:
- Contents can be any character that matches `[a-z0-9 \t]i`.
## Node
```js
{
type: 'bold',
children: [
{ type: 'text', props: { text: 'bold' }
]
}
```
<h1 id="small">Inline: inconspicuous characters</h2>
## Format
```
<small>small</small>
```
## Details
- InlineParser is applied to the content again.
- The content can also contain newlines.
## Node
```js
{
type: 'small',
children: [
{ type: 'text', props: { text: 'small' }
]
}
````
<h1 id="italic">Inline: italic</h2>
## Format
Syntax 1:
```
<i>italic</i>.
```
Syntax 2:
```
*italic*
```
Syntax 3:
```
_italic_
```
## Details
- InlineParser is applied to the content again.
Syntax 1 only :
- The content can also contain newlines.
Syntax 2 and 3 only :
The first `*` and `_` are called the start symbols.
- The content can contain characters that match `[a-z0-9 \t]i`.
- If the character before the start symbol is one of (none, newline, space, or does not match [a-zA-Z0-9]), it is judged as an italic character.
## Node
```js
{
type: 'italic',
children: [
{ type: 'text', props: { text: 'italic' }
]
}
```
<h1 id="strike">Inline: strikethrough</h2>
## Format
Syntax 1:
```
~~strike~
```
Syntax 2:
```
<s>strike</s>.
```
## Details
- InlineParser is applied to the content again.
Syntax 1 only:
- Content can contain any character except `~` and newline.
Syntax 2 only:
- The content can be any character except newline.
## Node
```js
{
type: 'strike',
children: [
{ type: 'text', props: { text: 'strike' }
]
}
```
<h1 id="inline-code">Inline: inline code</h2>
## Format.
```
`$abc <- 1`.
```
## Details
- The content cannot contain newlines.
- The content cannot contain ''.
## Node
```js
{
type: 'inlineCode',
props: {
code: '$abc <- 1'
}
}
```
<h1 id="math-inline">Inline: Inline mathematical expressions</h2>
## Format
```
\(y = 2x\)
```
## Details
- The content cannot contain newlines.
## Node
```js
{
type: 'mathInline',
props: {
formula: 'y = 2x'
}
}
````
<h1 id="attention">Inline: Mentions</h2>
## format
```
@user@misskey.io
```
``` @user
@user
```
## Details
- Recognized as a mention if the character before the first `@` is one of (newline, space, none, or does not match [a-zA-Z0-9]).
### User name
- One or more characters.
- `A`-`Z` `0`-`9` `_` `-` can be included.
- The first and last characters cannot be `-`.
### hostname
- One or more characters.
- Can contain `A` to `Z` `0` to `9` `_` `-` `. ` can be included.
- The first and last characters cannot be `-` `. Cannot be `.
## Node
```js
{
type: 'attention',
props: {
username: 'user',
host: 'misskey.io',
acct: '@user@misskey.io'
}
}
````js
```js
{
type: 'attention',
props: {
username: 'user',
host: null,
acct: '@user'
}
}
````
<h1 id="hashtag">Inline: Hashtag</h2>
## Format
```
#abc
```
## Details
- The content cannot contain single-byte spaces, double-byte spaces, line feeds, or tab characters.
- The content cannot contain ``. ` `,` ` `! `? `'` `"`#` `:` `/` `【` `】` `<` `>` cannot be included in the content.
- Parentheses can be included in the content only when they are paired. Target: `()` ` `[]` ` `"`.
- Recognized as a hashtag if the character before `#` is one of the following (newline, space, none, or does not match [a-zA-Z0-9]).
- If the content is only numbers, it is not recognized as a hashtag.
## Node
```js
{
type: 'hashtag',
props: {
hashtag: 'abc'
}
}
```
<h1 id="url">Inline: URL</h2>
## Format
Syntax 1:
```
https://misskey.io/@ai
```
```
http://hoge.jp/abc
```
Syntax 2:
```
<https://misskey.io/@ai>
```
```
<http://藍.jp/abc>
```
## Details
Syntax 1 only:
- Contents include `[. ,a-z0-9_/:%#@$&? ~=+-]i` can be used for the content.
- The content can contain a pair of
Translated with www.DeepL.com/Translator (free version)