Update Invoice tests to use the new blocks interface, and fix reverse blocks iteration indexing
Changelog-None Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -139,6 +139,15 @@ struct NdbBlockGroup: ~Copyable {
|
||||
rawTextContent: content
|
||||
)
|
||||
}
|
||||
|
||||
/// Parses the note contents on-demand from a specific text.
|
||||
static func parse(content: String) throws(NdbBlocksError) -> Self {
|
||||
guard let metadata = BlocksMetadata.parseContent(content: content) else { throw NdbBlocksError.parseError }
|
||||
return self.init(
|
||||
metadata: .pure(metadata),
|
||||
rawTextContent: content
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
enum MaybeTxn<T: ~Copyable>: ~Copyable {
|
||||
|
||||
Reference in New Issue
Block a user