File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
__Snapshots__/MarkdownTests Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -423,4 +423,22 @@ final class MarkdownContentTests: XCTestCase {
423423 )
424424 XCTAssertEqual ( markdown, content. renderMarkdown ( ) )
425425 }
426+
427+ func testComment( ) {
428+ // given
429+ let markdown = """
430+ <!--This is a comment-->
431+ <!--
432+ This is a
433+ multiline comment
434+ -->
435+ """
436+
437+ // when
438+ let content = MarkdownContent ( markdown)
439+
440+ // then
441+ XCTAssertEqual ( MarkdownContent { } , content)
442+ XCTAssertEqual ( " " , content. renderMarkdown ( ) )
443+ }
426444}
Original file line number Diff line number Diff line change 342342
343343 assertSnapshot ( of: view, as: . image( layout: layout) )
344344 }
345+
346+ func testComment( ) {
347+ let view = Markdown {
348+ #"""
349+ This is rendered
350+ <!--This is a comment-->
351+ <!--
352+ This is a multiline
353+ comment
354+ -->
355+ So is this
356+ """#
357+ } . markdownSoftBreakMode ( . lineBreak)
358+
359+ assertSnapshot ( of: view, as: . image( layout: layout) )
360+ }
345361 }
346362#endif
You can’t perform that action at this time.
0 commit comments