Add Syntax Highlight for Document Generator (#519)
Add PHP, Lua language tag to Code area
This commit is contained in:
parent
2786aa7bfa
commit
4c1096a49a
@ -202,7 +202,7 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
|
|||||||
if (!isset($this->settings['td'])) {
|
if (!isset($this->settings['td'])) {
|
||||||
$example = '### Example:
|
$example = '### Example:
|
||||||
|
|
||||||
```
|
```php
|
||||||
$'.$constructor.$layer.' = '.$params.';
|
$'.$constructor.$layer.' = '.$params.';
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -213,10 +213,9 @@ $'.$constructor.$layer.' = '.$params.';
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Or, if you\'re into Lua:
|
Or, if you\'re into Lua:
|
||||||
|
|
||||||
|
```lua
|
||||||
```
|
|
||||||
'.$constructor.$layer.'='.$lua_params.'
|
'.$constructor.$layer.'='.$lua_params.'
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -242,7 +241,7 @@ Set parse_mode to Markdown to enable markown AND html parsing of the message.
|
|||||||
|
|
||||||
The following tags are currently supported:
|
The following tags are currently supported:
|
||||||
|
|
||||||
```
|
```html
|
||||||
<br>a newline
|
<br>a newline
|
||||||
<b><i>bold works ok, internal tags are stripped</i> </b>
|
<b><i>bold works ok, internal tags are stripped</i> </b>
|
||||||
<strong>bold</strong>
|
<strong>bold</strong>
|
||||||
@ -258,7 +257,7 @@ The following tags are currently supported:
|
|||||||
|
|
||||||
You can also use normal markdown, note that to create mentions you must use the `mention:` syntax like in html:
|
You can also use normal markdown, note that to create mentions you must use the `mention:` syntax like in html:
|
||||||
|
|
||||||
```
|
```markdown
|
||||||
[Mention by username](mention:@danogentili)
|
[Mention by username](mention:@danogentili)
|
||||||
[Mention by user id](mention:186785362)
|
[Mention by user id](mention:186785362)
|
||||||
```
|
```
|
||||||
|
@ -211,7 +211,7 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
|
|||||||
$example .= str_replace('[]', '', '### MadelineProto Example:
|
$example .= str_replace('[]', '', '### MadelineProto Example:
|
||||||
|
|
||||||
|
|
||||||
```
|
```php
|
||||||
if (!file_exists(\'madeline.php\')) {
|
if (!file_exists(\'madeline.php\')) {
|
||||||
copy(\'https://phar.madelineproto.xyz/madeline.php\', \'madeline.php\');
|
copy(\'https://phar.madelineproto.xyz/madeline.php\', \'madeline.php\');
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ Parameters:
|
|||||||
|
|
||||||
Or, if you\'re into Lua:
|
Or, if you\'re into Lua:
|
||||||
|
|
||||||
```
|
```lua
|
||||||
'.$type.' = '.$data['method'].'({'.$lua_params.'})
|
'.$type.' = '.$data['method'].'({'.$lua_params.'})
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -280,7 +280,7 @@ Set parse_mode to Markdown to enable markown AND html parsing of the message.
|
|||||||
|
|
||||||
The following tags are currently supported:
|
The following tags are currently supported:
|
||||||
|
|
||||||
```
|
```html
|
||||||
<br>a newline
|
<br>a newline
|
||||||
<b><i>bold works ok, internal tags are stripped</i> </b>
|
<b><i>bold works ok, internal tags are stripped</i> </b>
|
||||||
<strong>bold</strong>
|
<strong>bold</strong>
|
||||||
@ -296,7 +296,7 @@ The following tags are currently supported:
|
|||||||
|
|
||||||
You can also use normal markdown, note that to create mentions you must use the `mention:` syntax like in html:
|
You can also use normal markdown, note that to create mentions you must use the `mention:` syntax like in html:
|
||||||
|
|
||||||
```
|
```markdown
|
||||||
[Mention by username](mention:@danogentili)
|
[Mention by username](mention:@danogentili)
|
||||||
[Mention by user id](mention:186785362)
|
[Mention by user id](mention:186785362)
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user