Skip to content

Commit

Permalink
Merge pull request #36 from mizunashi-mana/partial-resolve-35
Browse files Browse the repository at this point in the history
Partial resolve #35
  • Loading branch information
mizunashi-mana committed Nov 9, 2018
2 parents ef699c0 + 12b1263 commit 63b946d
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/DokuWiki/Plugin/Mdpage/MarkdownRendererTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ protected function renderLink($block) {
$url = $block['url'];
if (strpos($url, '/') === false) {
$this->renderer->internallink($url, $this->collectText($block['text']));
} elseif (empty($block['title'])) {
} else { // title is not supported
$this->renderer->externallink($url, $this->collectText($block['text']));
}

Expand Down
21 changes: 14 additions & 7 deletions tests/DokuWiki/Test/Plugin/Mdpage/MarkdownSpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ public function testFeatures() {
);
}

public function testIssue24() {
$this->assertSpec(
'issue-24/Content',
$this->defaultFlavors
);
}

public function testHtmlok() {
global $conf;
$conf['htmlok'] = 1;
Expand All @@ -60,6 +53,20 @@ public function testCannotLookupRef() {
);
}

public function testIssue24() {
$this->assertSpec(
'issue-24/Content',
$this->defaultFlavors
);
}

public function testIssue35() {
$this->assertSpec(
'issue-35/Content',
$this->defaultFlavors
);
}

/**
* This plugin has fallback HTML rendering for PHP 7.2
* So, the results of rendering are different between PHP >= 7.2 and PHP < 7.2.
Expand Down
1 change: 1 addition & 0 deletions tests/specs/issue-35/Content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[link](https://example.com "title")
3 changes: 3 additions & 0 deletions tests/specs/issue-35/Content_GFM.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
<a class="urlextern" href="https://example.com" rel="nofollow" title="https://example.com">link</a>
</p>
3 changes: 3 additions & 0 deletions tests/specs/issue-35/Content_MarkdownExtra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
<a class="urlextern" href="https://example.com" rel="nofollow" title="https://example.com">link</a>
</p>
3 changes: 3 additions & 0 deletions tests/specs/issue-35/Content_Traditional.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
<a class="urlextern" href="https://example.com" rel="nofollow" title="https://example.com">link</a>
</p>

0 comments on commit 63b946d

Please sign in to comment.