Skip to content

Commit cb80ea4

Browse files
georgempQuietMisdreavus
authored andcommitted
fix: added tests for fix #132
1 parent f229a65 commit cb80ea4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Tests/MarkdownTests/Base/MarkupTests.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,21 @@ final class MarkupTests: XCTestCase {
283283
)!.debugDescription()
284284
)
285285
}
286+
287+
func testChildThroughIndicesWithMultipleParagraphs() {
288+
let source = """
289+
This is a markup __*document*__ with *some* **more** attributes.
290+
291+
This is the *second* paragraph.
292+
This is on a **new** line, but, continues on the same paragraph.
293+
294+
This is the *third* paragraph.
295+
This is on a **new** line, but, continues on the same paragraph.
296+
"""
297+
298+
let document = Document(parsing: source)
299+
XCTAssertNotNil(document.child(through: [2, 5]) as? Strong)
300+
}
286301

287302
func testChildAtPositionHasCorrectType() throws {
288303
let source = "This is a [*link*](github.com). And some **bold** and *italic* text."

0 commit comments

Comments
 (0)