Fix npub mention bugs, fix slowness when parsing large posts
Switch the post parser to use the same code as the content parser. This was causing many issues, including performance issues. Changelog-Fixed: Fix lag when creating large posts Changelog-Fixed: Fix npub mentions failing to parse in some cases Changelog-Added: Add r tag when mentioning a url Changelog-Removed: Remove old @ and & hex key mentions
This commit is contained in:
@@ -74,8 +74,10 @@ class damusTests: XCTestCase {
|
||||
let parsed = parse_mentions(content: md, tags: []).blocks
|
||||
|
||||
XCTAssertNotNil(parsed)
|
||||
XCTAssertEqual(parsed.count, 1)
|
||||
XCTAssertEqual(parsed.count, 3)
|
||||
XCTAssertNotNil(parsed[0].is_text)
|
||||
XCTAssertNotNil(parsed[1].is_url)
|
||||
XCTAssertNotNil(parsed[2].is_text)
|
||||
}
|
||||
|
||||
func testParseUrlUpper() {
|
||||
|
||||
Reference in New Issue
Block a user