Skip to content

Adds two line breaks after Heading blocks when at EOF #2

@jscalo

Description

@jscalo

Currently the formatter adds 2 newlines after heading blocks which is normally fine, but isn't quite right when the block is the last thing in the document. I added a test case fort this:

    func testHeadingLineBreaks3() {
        let markdown = "# Heading 1"
        let attributedString = AttributedStringFormatter.format(markdown: markdown, attributes: Self.defaultMDAttrs)
        
        XCTAssertFalse(attributedString.string.hasSuffix("\n\n"), attributedString.string)
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions