mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
iOS: Removing event id links (#509)
* removing unused event id link * changelog * Revert "removing unused event id link" This reverts commit aacd1124498674662123d5598604ef8bfcdfe02e. * commented the event id add link code * better changelog * commenting a tes that is related to the use of event id links which we don't handle for now
This commit is contained in:
@@ -153,7 +153,8 @@ struct AttributedStringBuilder: AttributedStringBuilderProtocol {
|
|||||||
|
|
||||||
var matches = MatrixEntityRegex.userIdentifierRegex.matches(in: string, options: [], range: range)
|
var matches = MatrixEntityRegex.userIdentifierRegex.matches(in: string, options: [], range: range)
|
||||||
matches.append(contentsOf: MatrixEntityRegex.roomIdentifierRegex.matches(in: string, options: [], range: range))
|
matches.append(contentsOf: MatrixEntityRegex.roomIdentifierRegex.matches(in: string, options: [], range: range))
|
||||||
matches.append(contentsOf: MatrixEntityRegex.eventIdentifierRegex.matches(in: string, options: [], range: range))
|
// As of right now we do not handle event id links in any way so there is no need to add them as links
|
||||||
|
// matches.append(contentsOf: MatrixEntityRegex.eventIdentifierRegex.matches(in: string, options: [], range: range))
|
||||||
matches.append(contentsOf: MatrixEntityRegex.roomAliasRegex.matches(in: string, options: [], range: range))
|
matches.append(contentsOf: MatrixEntityRegex.roomAliasRegex.matches(in: string, options: [], range: range))
|
||||||
matches.append(contentsOf: MatrixEntityRegex.linkRegex.matches(in: string, options: [], range: range))
|
matches.append(contentsOf: MatrixEntityRegex.linkRegex.matches(in: string, options: [], range: range))
|
||||||
|
|
||||||
|
|||||||
@@ -179,13 +179,14 @@ class AttributedStringBuilderTests: XCTestCase {
|
|||||||
checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromHTML(string), expected: roomId)
|
checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromHTML(string), expected: roomId)
|
||||||
checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromPlain(string), expected: roomId)
|
checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromPlain(string), expected: roomId)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testEventIdLink() {
|
// As of right now we do not handle event id links in any way so there is no need to add them as links
|
||||||
let eventId = "$eventidentifier"
|
// func testEventIdLink() {
|
||||||
let string = "The event is \(eventId)."
|
// let eventId = "$eventidentifier"
|
||||||
checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromHTML(string), expected: eventId)
|
// let string = "The event is \(eventId)."
|
||||||
checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromPlain(string), expected: eventId)
|
// checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromHTML(string), expected: eventId)
|
||||||
}
|
// checkMatrixEntityLinkIn(attributedString: attributedStringBuilder.fromPlain(string), expected: eventId)
|
||||||
|
// }
|
||||||
|
|
||||||
func testDefaultFont() {
|
func testDefaultFont() {
|
||||||
let htmlString = "<b>Test</b> <i>string</i>."
|
let htmlString = "<b>Test</b> <i>string</i>."
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Fixed a bug that recognised any amount in dollars as an untappable link.
|
||||||
Reference in New Issue
Block a user