parent
266caf70e5
commit
27762affe3
3 changed files with 4 additions and 1 deletions
|
@ -594,7 +594,7 @@ link = try $ do
|
|||
then char ']'
|
||||
else lookAhead $ space <|>
|
||||
try (oneOf "!.,;:" *> (space <|> newline))
|
||||
url <- manyTill nonspaceChar stop
|
||||
url <- many1Till nonspaceChar stop
|
||||
let name' = if B.toList name == [Str "$"] then B.str url else name
|
||||
return $ if attr == nullAttr
|
||||
then B.link url "" name'
|
||||
|
|
|
@ -96,6 +96,7 @@ Pandoc (Meta {unMeta = fromList []})
|
|||
,Header 2 ("explicit",[],[]) [Str "Explicit"]
|
||||
,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "url"] ("http://www.url.com","")]
|
||||
,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
|
||||
,Para [Str "\"not",Space,Str "a",Space,Str "link\":",Space,Str "foo"]
|
||||
,Para [Str "Automatic",Space,Str "linking",Space,Str "to",Space,Link ("",[],[]) [Str "http://www.example.com"] ("http://www.example.com",""),Str "."]
|
||||
,Para [Link ("",[],[]) [Str "Example"] ("http://www.example.com/",""),Str ":",Space,Str "Example",Space,Str "of",Space,Str "a",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "colon."]
|
||||
,Para [Str "A",Space,Str "link",Link ("",[],[]) [Str "with",Space,Str "brackets"] ("http://www.example.com",""),Str "and",Space,Str "no",Space,Str "spaces."]
|
||||
|
|
|
@ -174,6 +174,8 @@ Just a "url":http://www.url.com
|
|||
|
||||
"Email link":mailto:nobody@nowhere.net
|
||||
|
||||
"not a link": foo
|
||||
|
||||
Automatic linking to "$":http://www.example.com.
|
||||
|
||||
"Example":http://www.example.com/: Example of a link followed by a colon.
|
||||
|
|
Loading…
Reference in a new issue