Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

Serialize Doc back into a Text value #30

@tysonzero

Description

@tysonzero

We are sometimes using cheapskate to parse existing markdown, but other times we are using it to generate markdown of our own instead of concatenating a bunch of strings. The downside is that once you have a Doc, there doesn't seem to be a way to get the underlying Text back, for things like storing it in a database or passing it into text editors.

A render :: Doc -> Text function would be fantastic, although maybe Blocks -> Text would be more appropriate as the Options payload in Doc seems irrelevant when you aren't rendering to HTML.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions