Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion remote.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

//use dokuwiki\Extension\AdminPlugin;
use dokuwiki\Extension\RemotePlugin;
use dokuwiki\Remote\RemoteException;

class remote_plugin_asciidocjs extends DokuWiki_Remote_Plugin
class remote_plugin_asciidocjs extends RemotePlugin
{
/**
* Returns details about the remote plugin methods
Expand Down
13 changes: 3 additions & 10 deletions syntax/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,11 @@ public function runAsciidoctor($node, $ascdoc, $extensions, $params)
}
public function getExtensions()
{
return array("kroki" => $this->getConf('use_kroki'));
return ["kroki" => $this->getConf('use_kroki')];
}
public function getParams()
{
$params = array("safe" => $this->getConf('safe_mode'),
"header_footer" => false,
"attributes" => array(
"DOKUWIKI_BASE" => DOKU_BASE,
"DOKUWIKI_URL" => DOKU_URL
)
);
$params = ["safe" => $this->getConf('safe_mode'), "header_footer" => false, "attributes" => ["DOKUWIKI_BASE" => DOKU_BASE, "DOKUWIKI_URL" => DOKU_URL]];
if ($this->getExtensions()["kroki"]) {
if ($this->getConf('kroki_server') != '') {
$params["attributes"]["kroki-server-url"] = $this->getConf('kroki_server');
Expand Down Expand Up @@ -174,6 +168,7 @@ public function handle($match, $state, $pos, Doku_Handler $handler)
}
return [$state, $data, ''];
case DOKU_LEXER_MATCHED:
case DOKU_LEXER_SPECIAL:
break;
case DOKU_LEXER_UNMATCHED:
$data = '';
Expand All @@ -198,8 +193,6 @@ public function handle($match, $state, $pos, Doku_Handler $handler)
return [$state, $data, $match];
case DOKU_LEXER_EXIT:
return [$state, '', ''];
case DOKU_LEXER_SPECIAL:
break;
}
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion syntax/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

// phpcs:disable
include_once 'base.php';
include_once __DIR__ . '/base.php';
// phpcs:enable

class syntax_plugin_asciidocjs_block extends SyntaxPlugin_asciidocjs_base
Expand Down
2 changes: 1 addition & 1 deletion syntax/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

// phpcs:disable
include_once 'base.php';
include_once __DIR__ . '/base.php';
// phpcs:enable

class syntax_plugin_asciidocjs_file extends SyntaxPlugin_asciidocjs_base
Expand Down