` are not supported because they are redundant
> **Note**: It is up to the client to look up user's input entity by ID for text mentions.
> In most cases, you can only use IDs of users that were seen by the client while using given storage.
>
> Alternatively, you can explicitly provide access hash like this:
> `Name`, where `abc` is user's access hash
> written as a hexadecimal integer. Order of the parameters does matter, i.e.
> `tg://user?hash=abc&id=1234567` will not be processed as expected.
## Block entities
The only block entity that Telegram supports is ``, therefore it is the only tag we support too.
Optionally, language for `` block can be specified like this:
```html
export type Foo = 42
```
| Code | Result (visual) |
| ----------------------------------------------------------------------------------- | ---------------------------- |
| <pre>multiline\ntext</pre>
| multiline
text
|
| <pre language="javascript">
export default 42
</pre>
| export default 42
|
## Nested and overlapped entities
HTML is a nested language, and so is this parser. It does support nested entities, but overlapped entities will not work
as expected!
Overlapping entities are supported in `unparse()`, though.
| Code | Result (visual) |
|---------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| `Welcome back, User!` | **Welcome back, _User_!** |
| `bold and italic` | **bold _and_** italic
⚠️ word "italic" is not actually italic! |
| `bold and italic`
⚠️ this is how unparse()
handles overlapping entities | **bold _and_** _italic_ |
## Interpolation
Being a tagged template literal, `html` supports interpolation.
You can interpolate one of the following:
- `string` - **will not** be parsed, and appended to plain text as-is
- In case you want the string to be parsed, use `html` as a simple function: html\`... ${html('**bold**')} ...\`
- `number` - will be converted to string and appended to plain text as-is
- `TextWithEntities` or `MessageEntity` - will add the text and its entities to the output. This is the type returned by `html` itself:
```ts
const bold = html`**bold**`
const text = html`Hello, ${bold}!`
```
- falsy value (i.e. `null`, `undefined`, `false`) - will be ignored
Note that because of interpolation, you almost never need to think about escaping anything,
since the values are not even parsed as HTML, and are appended to the output as-is.