code syntax core directory

This commit is contained in:
Frédéric FRANCE
2021-02-23 22:03:23 +01:00
parent 2642e1d1b3
commit 554e449e40
512 changed files with 34726 additions and 28660 deletions

View File

@@ -31,17 +31,14 @@
*/
function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null)
{
if (is_array($replaceimagepath))
{
foreach ($replaceimagepath as $key => $val)
{
if (is_array($replaceimagepath)) {
foreach ($replaceimagepath as $key => $val) {
$keytoreplace = ']('.$key;
$valafter = ']('.$val;
$content = preg_replace('/'.preg_quote($keytoreplace, '/').'/m', $valafter, $content);
}
}
if ($parser == 'parsedown')
{
if ($parser == 'parsedown') {
include_once DOL_DOCUMENT_ROOT.'/includes/parsedown/Parsedown.php';
$Parsedown = new Parsedown();
$content = $Parsedown->text($content);
@@ -63,10 +60,8 @@ function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null)
*/
function dolMd2Asciidoc($content, $parser = 'dolibarr', $replaceimagepath = null)
{
if (is_array($replaceimagepath))
{
foreach ($replaceimagepath as $key => $val)
{
if (is_array($replaceimagepath)) {
foreach ($replaceimagepath as $key => $val) {
$keytoreplace = ']('.$key;
$valafter = ']('.$val;
$content = preg_replace('/'.preg_quote($keytoreplace, '/').'/m', $valafter, $content);