Skip to content

markdown export of a book results in page-title headers being directly concatenated to the previous page's text #3341

Description

@flan

Describe the Bug

Observed in BookStack 22.02.3

After creating a book comprised of multiple pages, I went to export it as markdown for use in another rendering pipeline. This mostly worked as expected, but there was an oddity: where one page ends and the next begins, no linebreaks were inserted, so the output looks like this:

nothing is allowed to fall through the cracks.# Discovery

The title of the next page, "Discovery", is rendered as a header, but it is quite literally concatenated to the last sentence of the previous page.

I did not test this against books comprised of chapters.

Steps to Reproduce

Export, as markdown, any book comprised of pages.

Expected Behaviour

Rather than what was seen,

nothing is allowed to fall through the cracks.# Discovery

I expected to see

nothing is allowed to fall through the cracks.

# Discovery

with two linebreaks at the point of page-concatenation to produce valid markdown.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

22.02.3

PHP Version

No response

Hosting Environment

Self-hosted, deployed from installer scripts in a Debian Bullseye VM.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions