blob: b9548d6fa60f914bb36a78e9570889bfca39304d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
/**
* @package parsedown
* @subpackage build
*/
function getSnippetContent($filename) {
$o = file_get_contents($filename);
$o = trim(str_replace(array('<?php','?>'),'',$o));
return $o;
}
$snippets = array();
$snippets[1] = $modx->newObject('modSnippet');
$snippets[1]->fromArray(array(
'id' => 1,
'name' => 'Parsedown',
'description' => 'A markdown parser with GFM support',
'snippet' => getSnippetContent($sources['elements'].'snippets/snippet.parsedown.php'),
),'',true,true);
return $snippets;
|