Fix Issue #1820 Hashtags including U+5009 to U+500D are not correctly parsed
Closes: https://github.com/damus-io/damus/pull/1830 Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
26bd50c948
commit
f6044a9eea
@@ -545,4 +545,15 @@ final class HashtagTests: XCTestCase {
|
||||
XCTAssertEqual(parsed[2].asText, " is allowed in hashtags")
|
||||
}
|
||||
|
||||
// Japanese: bai (倍) (U+500D) (allowed in hashtags)
|
||||
func testHashtagWithBaiKanji() {
|
||||
let parsed = parse_note_content(content: .content("pow! #10倍界王拳 is allowed in hashtags",nil)).blocks
|
||||
|
||||
XCTAssertNotNil(parsed)
|
||||
XCTAssertEqual(parsed.count, 3)
|
||||
XCTAssertEqual(parsed[0].asText, "pow! ")
|
||||
XCTAssertEqual(parsed[1].asHashtag, "10倍界王拳")
|
||||
XCTAssertEqual(parsed[2].asText, " is allowed in hashtags")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user