New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(viewer): recognise URLs in text value and convert into link (DSP-1595) #315
Conversation
This is how it works: |
let stylizedText: string = ''; | ||
if (value && value.length > 0) { | ||
for (let str of value.split(' ')) { | ||
// if string/url ends with a full stop '.' or column ':' the pipe will not recognize the url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should be updated to align with line 19. Also, ':' is called a colon in english :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yes... colon, not column
fixed in 29c25eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and in ab088df
}) | ||
export class LinkifyPipe implements PipeTransform { | ||
|
||
// constructor(private _domSanitizer: DomSanitizer) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed in 29c25eb
import { Pipe, PipeTransform } from '@angular/core'; | ||
|
||
/** | ||
* This pipe analyses a string and converts any url into a href tags |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tags -> tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 29c25eb
resolves DSP-1595
s. comment: https://dasch.myjetbrains.com/youtrack/issue/DSP-1595#focus=Comments-4-3243.0-0