artifacts: allow unseparated note artifacts
This is needed for longform events. Right now we treat unseparated note artifacts as a list of blocks, but we will likely need to render these blocks into lists of attributed texts with image blocks inbetween.
This commit is contained in:
@@ -33,6 +33,18 @@ class MarkdownTests: XCTestCase {
|
||||
let expected = try AttributedString(markdown: "prologue [damus.io](https://damus.io) epilogue", options: md_opts)
|
||||
XCTAssertEqual(md, expected)
|
||||
}
|
||||
|
||||
func test_longform_rendering() throws {
|
||||
let st = test_damus_state()
|
||||
let artifacts = render_note_content(ev: test_longform_event.event, profiles: st.profiles, privkey: st.keypair.privkey)
|
||||
|
||||
switch artifacts {
|
||||
case .separated:
|
||||
XCTAssert(false)
|
||||
case .parts(let parts):
|
||||
XCTAssertEqual(parts.parts.count, 1)
|
||||
}
|
||||
}
|
||||
|
||||
func test_convert_links() throws {
|
||||
let helper = Markdown()
|
||||
|
||||
Reference in New Issue
Block a user