-
Notifications
You must be signed in to change notification settings - Fork 4
/
extend.php
65 lines (56 loc) · 2.88 KB
/
extend.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/*
* This file is part of MathRen.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
namespace TheTurk\MathRen;
use Flarum\Api\Serializer\ForumSerializer;
use Flarum\Extend;
return [
(new Extend\Frontend('forum'))
->css(__DIR__.'/less/forum.less')
->js(__DIR__.'/js/dist/forum.js'),
(new Extend\Frontend('admin'))
->css(__DIR__.'/less/admin.less')
->js(__DIR__.'/js/dist/admin.js'),
(new Extend\Locales(__DIR__.'/locale')),
(new Extend\ApiSerializer(ForumSerializer::class))
->attributes(LoadSettings::class),
(new Extend\Formatter())
->configure(ConfigureTextFormatter::class),
(new Extend\Settings())
->default('the-turk-mathren.alias_block_delimiters', '$$%e%$$,₺₺%e%₺₺')
->default('the-turk-mathren.alias_inline_delimiters', '\\(%e%\\)')
->default('the-turk-mathren.block_delimiters', '[math]%e%[/math]')
->default('the-turk-mathren.inline_delimiters', '[imath]%e%[/imath]')
->default('the-turk-mathren.alias_block_asciimath_delimiters', '\\$%e%\\$')
->default('the-turk-mathren.alias_inline_asciimath_delimiters', '\\{%e%\\}')
->default('the-turk-mathren.block_asciimath_delimiters', '[asmath]%e%[/asmath]')
->default('the-turk-mathren.inline_asciimath_delimiters', '[iasmath]%e%[/iasmath]')
->default('the-turk-mathren.color_is_text_color', '0')
->default('the-turk-mathren.enable_copy_tex', '1')
->default('the-turk-mathren.enable_fleqn', '0')
->default('the-turk-mathren.enable_leqno', '0')
->default('the-turk-mathren.enable_editor_buttons', '1')
->default('the-turk-mathren.throw_on_error', '0')
->default('the-turk-mathren.error_color', '#cc0000')
->default('the-turk-mathren.max_expand', '1000')
->default('the-turk-mathren.max_size', '10')
->default('the-turk-mathren.min_rule_thickness', '0.05')
->default('the-turk-mathren.output_mode', 'htmlAndMathml')
->default('the-turk-mathren.aliases_as_primary', '1')
->default('the-turk-mathren.allow_asciimath', '0')
->default('the-turk-mathren.cdn_katex', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js')
->default('the-turk-mathren.sri_katex', 'sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja')
->default('the-turk-mathren.cdn_asciimath2tex', 'https://unpkg.com/[email protected]/dist/asciimath2tex.umd.js')
->default('the-turk-mathren.sri_asciimath2tex', 'sha384-cdvLGvItf6Jz+kIS7cNq6cThfMF6hSoUveHAZJBnJqmEosxD2lUHn2/pUmGKGybo')
->registerLessConfigVar(
'config-copy-tex',
'the-turk-mathren.enable_copy_tex',
function ($setting) {
return \boolval($setting) ? 'true' : 'false';
}
),
];