|
10 | 10 | * For the full copyright and license information, please view the LICENSE |
11 | 11 | * file that was distributed with this source code. |
12 | 12 | */ |
13 | | -use League\CommonMark\Extension\Attributes\AttributesExtension; |
14 | 13 | use League\CommonMark\Extension\HeadingPermalink\HeadingPermalinkExtension; |
15 | 14 | use League\CommonMark\Extension\Mention\MentionExtension; |
16 | 15 | use Torchlight\Commonmark\V2\TorchlightExtension; |
|
53 | 52 | League\CommonMark\Extension\Table\TableExtension::class, |
54 | 53 | HeadingPermalinkExtension::class, |
55 | 54 | MentionExtension::class, |
56 | | - AttributesExtension::class, |
57 | 55 | TorchlightExtension::class, |
58 | 56 | ], |
59 | 57 |
|
| 58 | + 'heading_permalink' => [ |
| 59 | + 'html_class' => 'anchor mr-2 !text-skin-primary !no-underline hover:!text-skin-primary-hover focus:!text-skin-primary-hover focus:outline-none', |
| 60 | + 'fragment_prefix' => '', |
| 61 | + 'id_prefix' => '', |
| 62 | + 'symbol' => '#', |
| 63 | + ], |
| 64 | + |
| 65 | + 'mentions' => [ |
| 66 | + 'username' => [ |
| 67 | + 'prefix' => '@', |
| 68 | + 'pattern' => '[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}(?!\w)', |
| 69 | + 'generator' => config('app.url').'/user/%s', |
| 70 | + ], |
| 71 | + ], |
| 72 | + |
60 | 73 | /* |
61 | 74 | |-------------------------------------------------------------------------- |
62 | 75 | | Renderer Configuration |
|
78 | 91 | 'soft_break' => "\n", |
79 | 92 | ], |
80 | 93 |
|
81 | | - 'heading_permalink' => [ |
82 | | - 'html_class' => 'anchor !text-skin-primary !no-underline hover:!text-skin-primary-hover focus:!text-skin-primary-hover focus:outline-none', |
83 | | - 'symbol' => '', |
84 | | - 'aria_hidden' => true, |
85 | | - ], |
86 | | - |
87 | | - 'mentions' => [ |
88 | | - 'username' => [ |
89 | | - 'prefix' => '@', |
90 | | - 'pattern' => '[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}(?!\w)', |
91 | | - 'generator' => config('app.url').'/user/%s', |
92 | | - ], |
93 | | - ], |
94 | | - |
95 | 94 | /* |
96 | 95 | |-------------------------------------------------------------------------- |
97 | 96 | | Commonmark Configuration |
|
128 | 127 | | |
129 | 128 | */ |
130 | 129 |
|
131 | | - 'html_input' => 'strip', |
| 130 | + 'html_input' => 'allow', |
132 | 131 |
|
133 | 132 | /* |
134 | 133 | |-------------------------------------------------------------------------- |
|
0 commit comments