Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linkify
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
Elixir libraries
Linkify
Commits
82ba30c6
Commit
82ba30c6
authored
6 years ago
by
minibikini
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
cfc6355b
No related branches found
No related tags found
4 merge requests
!10
Improve Parser
,
!9
Improve detection of URLs and Asian scripts
,
!8
Improve CI
,
!6
Fix link text
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/auto_linker/builder.ex
+2
-4
2 additions, 4 deletions
lib/auto_linker/builder.ex
with
2 additions
and
4 deletions
lib/auto_linker/builder.ex
+
2
−
4
View file @
82ba30c6
...
@@ -59,7 +59,7 @@ defmodule AutoLinker.Builder do
...
@@ -59,7 +59,7 @@ defmodule AutoLinker.Builder do
|>
truncate
(
Map
.
get
(
opts
,
:truncate
,
false
))
|>
truncate
(
Map
.
get
(
opts
,
:truncate
,
false
))
attrs
=
format_attrs
(
attrs
)
attrs
=
format_attrs
(
attrs
)
"<a
#{
attrs
}
>
"
<>
url
<>
"
</a>"
"<a
#{
attrs
}
>
#{
url
}
</a>"
end
end
defp
format_attrs
(
attrs
)
do
defp
format_attrs
(
attrs
)
do
...
@@ -93,9 +93,7 @@ defmodule AutoLinker.Builder do
...
@@ -93,9 +93,7 @@ defmodule AutoLinker.Builder do
defp
strip_prefix
(
url
,
_
),
do
:
url
defp
strip_prefix
(
url
,
_
),
do
:
url
def
create_phone_link
([],
buffer
,
_
)
do
def
create_phone_link
([],
buffer
,
_
),
do
:
buffer
buffer
end
def
create_phone_link
([
h
|
t
],
buffer
,
opts
)
do
def
create_phone_link
([
h
|
t
],
buffer
,
opts
)
do
create_phone_link
(
t
,
format_phone_link
(
h
,
buffer
,
opts
),
opts
)
create_phone_link
(
t
,
format_phone_link
(
h
,
buffer
,
opts
),
opts
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment