Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
795
Issues
795
List
Boards
Labels
Service Desk
Milestones
Merge Requests
62
Merge Requests
62
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
5a986430
Commit
5a986430
authored
16 minutes ago
by
Mark Harding
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[Sprint/HipsterHedgehog](bug) Updated tags pipe to allow . character mid tag
#89
"
This reverts commit
9aa7e1ff
.
parent
82595d15
master
No related merge requests found
Pipeline
#69268353
running with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
tags.spec.ts
src/app/common/pipes/tags.spec.ts
+1
-8
tags.ts
src/app/common/pipes/tags.ts
+2
-2
No files found.
src/app/common/pipes/tags.spec.ts
View file @
5a986430
...
...
@@ -79,14 +79,6 @@ describe('TagPipe', () => {
expect
(
transformedString
).
toContain
(
'
<a class="tag"
'
);
});
it
(
'
should transform when @ followed by `.com`
'
,
()
=>
{
const
pipe
=
new
TagsPipe
(
featuresServiceMock
);
const
string
=
'
textstring @name.com
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toContain
(
'
<a class="tag"
'
);
expect
(
transformedString
).
toContain
(
'
@name.com
'
);
});
it
(
'
should transform to an email
'
,
()
=>
{
const
pipe
=
new
TagsPipe
(
featuresServiceMock
);
const
string
=
'
textstring@name.com
'
;
...
...
@@ -98,6 +90,7 @@ describe('TagPipe', () => {
const
pipe
=
new
TagsPipe
(
featuresServiceMock
);
const
string
=
'
textstring name
'
;
const
transformedString
=
pipe
.
transform
(
<
any
>
string
);
expect
(
transformedString
).
toEqual
(
string
);
expect
(
transformedString
).
not
.
toContain
(
'
<a class="tag"
'
);
});
...
...
This diff is collapsed.
Click to expand it.
src/app/common/pipes/tags.ts
View file @
5a986430
...
...
@@ -39,9 +39,9 @@ export class TagsPipe implements PipeTransform {
}
},
at
:
{
rule
:
/
(
^|
\
W)
@
([
a-z0-9_
\-\.]
+
[
a-z0-9_
])(\W
|$
)
/gmi
,
rule
:
/
(
^|
\
s
|
\W)
@
(\w
*
[
a-zA-Z_-
]
+
\w
*
)
/gim
,
replace
:
(
m
)
=>
{
return
`
${
m
.
match
[
1
]}
<a class="tag" href="/
${
m
.
match
[
2
]}
" target="_blank">@
${
m
.
match
[
2
]}
</a>
${
m
.
match
[
3
]}
`
;
return
`
${
m
.
match
[
1
]}
<a class="tag" href="/
${
m
.
match
[
2
]}
" target="_blank">@
${
m
.
match
[
2
]}
</a>`
;
}
}
};
...
...
This diff is collapsed.
Click to expand it.
Mark Harding
@markeharding
mentioned in issue
#1481
·
14 minutes ago
mentioned in issue
#1481
mentioned in issue #1481
Toggle commit list
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