adds consition to parsedown include
This commit is contained in:
parent
2a7c92e7d2
commit
402f94143a
|
@ -8,9 +8,11 @@ that does some markdown rendering.
|
|||
|
||||
```
|
||||
cd ./modules
|
||||
https://git.hangar.org/arcHIVE-tech/SimpleMDText/archive/main.zip
|
||||
https://git.hangar.org/arcHIVE-tech/SimpleMarkdown-omeka-module/archive/main.zip
|
||||
unzip main.zip
|
||||
mv simpletext/ SimpleMDText
|
||||
rm main.zip
|
||||
mv simplemarkdown-omeka-module/ SimpleMDText
|
||||
cd SimpleMDText
|
||||
composer install
|
||||
```
|
||||
|
||||
|
|
|
@ -10,7 +10,16 @@ use Laminas\View\Renderer\PhpRenderer;
|
|||
use Laminas\Form\FormElementManager;
|
||||
use SimpleMDText\Form\SimpleMDTextBlockForm;
|
||||
|
||||
require_once(dirname(__DIR__, 3) . '/vendor/erusev/parsedown/Parsedown.php');
|
||||
$list_of_includes = get_included_files();
|
||||
$parsedown_included=false;
|
||||
foreach ($list_of_includes as $file_path) {
|
||||
if (false !== strpos($file_path, "Parsedown.php")) {
|
||||
$parsedown_included=true;
|
||||
}
|
||||
}
|
||||
if ($parsedown_included == false){
|
||||
require_once(dirname(__DIR__, 3) . '/vendor/autoload.php');
|
||||
}
|
||||
use Parsedown;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue