Permalink
Browse files

Now allowing newlines inside inline-style link definitions.

  • Loading branch information...
1 parent cffcfe4 commit b820a9a14d4d0fbb6ad4e16470b4979c33314164 @michelf committed Oct 1, 2009
Showing with 9 additions and 6 deletions.
  1. +3 −0 PHP Markdown Readme.text
  2. +6 −6 markdown.php
View
@@ -225,6 +225,9 @@ Current:
There is still a quirk which may prevent this from working correctly with
relative URLs in inline-style links however.
+* Fixed a bug where inline-style links wouldn't be recognized when the link
+ definition contains a line break between the url and the title.
+
1.0.1m (21 Jun 2008):
View
@@ -680,18 +680,18 @@ function doAnchors($text) {
('.$this->nested_brackets_re.') # link text = $2
\]
\( # literal paren
- [ ]*
+ [ \n]*
(?:
<(.+?)> # href = $3
|
('.$this->nested_url_parenthesis_re.') # href = $4
)
- [ ]*
+ [ \n]*
( # $5
([\'"]) # quote char = $6
(.*?) # Title = $7
\6 # matching quote
- [ ]* # ignore any spaces/tabs between closing quote and )
+ [ \n]* # ignore any spaces/tabs between closing quote and )
)? # title is optional
\)
)
@@ -805,18 +805,18 @@ function doImages($text) {
\]
\s? # One optional whitespace character
\( # literal paren
- [ ]*
+ [ \n]*
(?:
<(\S*)> # src url = $3
|
('.$this->nested_url_parenthesis_re.') # src url = $4
)
- [ ]*
+ [ \n]*
( # $5
([\'"]) # quote char = $6
(.*?) # title = $7
\6 # matching quote
- [ ]*
+ [ \n]*
)? # title is optional
\)
)

0 comments on commit b820a9a

Please sign in to comment.