Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #322 from aelzenaar/master
Don't auto link patterns surrounded by """.
- Loading branch information
Showing
4 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<p>Recipe 123 and <a href="http://bugs.activestate.com/show_bug.cgi?id=234">a link to Komodo bug 234</a> are related.</p> | ||
|
||
<p><a href="http://example.org/Recipe 123">This is a link which has a pattern inside the url that shouldn't expand.</a></p> | ||
|
||
<p>Matched pattern is escaped: PEP 42 might be related too.</p> | ||
|
||
<p>Triple quotes not surrounding a matched pattern: PEP """42""" might be related too.</p> | ||
|
||
<p>"""This is some random text which should not be touched."""</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{"extras": ["link-patterns"], | ||
"link_patterns": [ | ||
(re.compile("recipe\s+(\d+)", re.I), r"http://code.activestate.com/recipes/\1/"), | ||
(re.compile("(?:komodo\s+)?bug\s+(\d+)", re.I), r"http://bugs.activestate.com/show_bug.cgi?id=\1"), | ||
(re.compile("PEP\s+(\d+)", re.I), lambda m: "http://www.python.org/dev/peps/pep-%04d/" % int(m.group(1))), | ||
], | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"""Recipe 123""" and <a href="http://bugs.activestate.com/show_bug.cgi?id=234">a link to """Komodo bug 234"""</a> are related. | ||
|
||
<a href="http://example.org/"""Recipe 123"""">This is a link which has a pattern inside the url that shouldn't expand.</a> | ||
|
||
Matched pattern is escaped: """PEP 42""" might be related too. | ||
|
||
Triple quotes not surrounding a matched pattern: PEP """42""" might be related too. | ||
|
||
"""This is some random text which should not be touched.""" |