Skip to content

Commit

Permalink
fix: Fallback link pointing to github during dw2pdf rendering (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdehaan authored Jul 25, 2022
1 parent b8cd33f commit 34515d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin.info.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
base bpmnio
author Jaap de Haan
email [email protected]
date 2022-07-24
date 2022-07-25
name bpmnio
desc Renders BPMN or DMN xml using the bpmn.io js library
url http://www.dokuwiki.org/plugin:bpmnio
14 changes: 13 additions & 1 deletion syntax/bpmnio.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,20 @@ public function handle($match, $state, $pos, Doku_Handler $handler)

public function render($mode, Doku_Renderer $renderer, $data)
{
list($match, $state) = $data;

if (is_a($renderer, 'renderer_plugin_dw2pdf')) {
if ($state == DOKU_LEXER_EXIT) {
$renderer->doc .= <<<HTML
<div class="plugin-bpmnio">
<a href="https://github.com/Color-Of-Code/dokuwiki-plugin-bpmnio/issues/4">DW2PDF support missing: Help wanted</a>
</div>
HTML;
}
return true;
}

if ($mode == 'xhtml' || $mode == 'odt') {
list($match, $state) = $data;
switch ($state) {
case DOKU_LEXER_ENTER:
preg_match('/<bpmnio type="(\w+)">/', $match, $type);
Expand Down

0 comments on commit 34515d8

Please sign in to comment.