[New Bridge] FiderBridge (#3378)

* [core] Add config parameter to markdownToHtml

* [FiderBridge] New bridge
This commit is contained in:
mrnoname1000 2023-05-11 14:24:12 -05:00 committed by GitHub
parent e99e026fa8
commit d0f7f5e2d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 158 additions and 2 deletions

View file

@ -194,8 +194,20 @@ $cleaned = stripRecursiveHTMLSection($string, $tag_name, $tag_start);
# markdownToHtml
Converts markdown input to HTML using [Parsedown](https://parsedown.org/).
| Parameter | Type | Optional | Description
| --------- | ------ | ---------- | ----------
| `string` | string | *required* | The URL of the contents to acquire
| `config` | array | *optional* | An array of Parsedown options in the format `['breaksEnabled' => true]`
Valid options:
| Option | Default | Description
| --------------- | ------- | -----------
| `breaksEnabled` | `false` | Enable automatic line breaks
| `markupEscaped` | `false` | Escape inline markup (HTML)
| `urlsLinked` | `true` | Automatically convert URLs to links
```php
function markdownToHtml(string $string) : string
function markdownToHtml(string $string, array $config = []) : string
```
**Example**