Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert linebreaks to <br/> #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

cmbuckley
Copy link

I considered wrapping this in an option to preserve BC, but the current output is broken when cell content contains linebreaks:

| A        | B                                    |
| -------- | ------------------------------------ |
| Single   | This is a single line                |
| Multiple | This one
spreads over
multiple lines | 

@wooorm
Copy link
Owner

wooorm commented Jan 25, 2023

If you want proper markdown output, you’re going to run into other cases, such as escapes. It’s better to build an AST and use mdast-util-to-markdown / mdast-util-gfm: https://github.com/wooorm/markdown-table#when-should-i-use-this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants