Skip to content

Commit

Permalink
Make image URL absolute
Browse files Browse the repository at this point in the history
To make it work within (nested) namespaces as well
  • Loading branch information
mdio committed Nov 4, 2019
1 parent ee4d483 commit 403d506
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,26 @@ language: php

matrix:
include:
- php: "7.3"
env: DOKUWIKI=master
- php: "7.3"
env: DOKUWIKI=release_stable_2018-04-22b
- php: "7.2"
env: DOKUWIKI=master
- php: "7.2"
env: DOKUWIKI=release_stable_2018-04-22a
env: DOKUWIKI=release_stable_2018-04-22b
- php: "7.1"
env: DOKUWIKI=master
- php: "7.1"
env: DOKUWIKI=release_stable_2018-04-22a
env: DOKUWIKI=release_stable_2018-04-22b
- php: "7.0"
env: DOKUWIKI=master
- php: "7.0"
env: DOKUWIKI=release_stable_2018-04-22a
env: DOKUWIKI=release_stable_2018-04-22b
- php: "5.6"
env: DOKUWIKI=master
- php: "5.6"
env: DOKUWIKI=release_stable_2018-04-22a
env: DOKUWIKI=release_stable_2018-04-22b
- php: "5.6"
env: DOKUWIKI=release_stable_2017-02-19e
- php: "5.6"
Expand All @@ -27,6 +31,6 @@ matrix:

before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
install: sh travis.sh
script:
script:
- cd _test
- phpunit --group plugin_textrotate
- ./phpunit.phar --stderr --group plugin_textrotate
4 changes: 2 additions & 2 deletions _test/syntax.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public function setup() {

public function test_basic_syntax() {
$xhtml = p_wiki_xhtml('test:plugin_textrotate');
$this->assertContains('<img class="textrotate" src="lib/images/tmp/', $xhtml);

$this->assertContains('<img class="textrotate" src="/lib/images/tmp/', $xhtml);

}

Expand Down
6 changes: 4 additions & 2 deletions syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ function render($mode, Doku_Renderer $renderer, $data)

}
//".$renderer->_xmlEntities($opt)."

$renderer->doc .="<img class='textrotate' src='$file' alt='adsf' >";

$renderer->doc .=<<<TAG
<img class="textrotate" src="/$file" alt="adsf" />
TAG;
}
//$renderer->doc .="</span>";
//$renderer->doc .="<div style='clear:both'></div>";
Expand Down

0 comments on commit 403d506

Please sign in to comment.