Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-wiki
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-wiki
Commits
2c35ea74
Commit
2c35ea74
authored
Aug 12, 2013
by
benjaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlize also on last-of-line urls + fix icon
parent
8fd557c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
wiki/plugins/links/mdx/urlize.py
+2
-2
No files found.
wiki/plugins/links/mdx/urlize.py
View file @
2c35ea74
...
@@ -52,7 +52,7 @@ URLIZE_RE = (
...
@@ -52,7 +52,7 @@ URLIZE_RE = (
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|'
# ...or ipv4
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|'
# ...or ipv4
r'\[?[A-F0-9]*:[A-F0-9:]+\]?)'
# ...or ipv6
r'\[?[A-F0-9]*:[A-F0-9:]+\]?)'
# ...or ipv6
r'(?::\d+)?'
# optional port
r'(?::\d+)?'
# optional port
r'(?:/[^\s\[\(\]\)]*
\s+
)?)'
r'(?:/[^\s\[\(\]\)]*
(?:\s+|$)
)?)'
)
)
class
UrlizePattern
(
markdown
.
inlinepatterns
.
Pattern
):
class
UrlizePattern
(
markdown
.
inlinepatterns
.
Pattern
):
...
@@ -78,7 +78,7 @@ class UrlizePattern(markdown.inlinepatterns.Pattern):
...
@@ -78,7 +78,7 @@ class UrlizePattern(markdown.inlinepatterns.Pattern):
url
=
'http://'
+
url
url
=
'http://'
+
url
icon
=
markdown
.
util
.
etree
.
Element
(
"span"
)
icon
=
markdown
.
util
.
etree
.
Element
(
"span"
)
icon
.
set
(
'class'
,
'icon-
link-external
'
)
icon
.
set
(
'class'
,
'icon-
external-link
'
)
span_text
=
markdown
.
util
.
etree
.
Element
(
"span"
)
span_text
=
markdown
.
util
.
etree
.
Element
(
"span"
)
span_text
.
text
=
markdown
.
util
.
AtomicString
(
" "
+
text
)
span_text
.
text
=
markdown
.
util
.
AtomicString
(
" "
+
text
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment