Skip to content

Commit

Permalink
Fixes #21 Failed on Linux
Browse files Browse the repository at this point in the history
Fixes #23 GFM auto-link recreated an existing link
  • Loading branch information
kzykhys committed Dec 4, 2013
1 parent 6c1272e commit 0b6d7a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Ciconia/Extension/Core/LinkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function processAutoLink(Text $text)
}

$text->replace('{<((?:https?|ftp):[^\'">\s]+)>}', function (Text $w, Text $url) {
$this->markdown->emit('escape.special_chars', [$url->replace('/(?<!\\\\)_/', '\\_')]);
$this->markdown->emit('escape.special_chars', [$url->replace('/(?<!\\\\)_/', '\\\\_')]);

return $this->getRenderer()->renderLink($url, [
'href' => $url->getString()
Expand Down
2 changes: 1 addition & 1 deletion src/Ciconia/Extension/Gfm/UrlAutoLinkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class UrlAutoLinkExtension implements ExtensionInterface
*/
public function register(Markdown $markdown)
{
$markdown->on('inline', array($this, 'processStandardUrl'), 40);
$markdown->on('inline', array($this, 'processStandardUrl'), 35);
}

/**
Expand Down

0 comments on commit 0b6d7a5

Please sign in to comment.