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

Blockquote #25

Open
py-prachi opened this issue Jul 5, 2024 · 0 comments
Open

Blockquote #25

py-prachi opened this issue Jul 5, 2024 · 0 comments

Comments

@py-prachi
Copy link

I tried using the package in my component which uses React Quill. I am converting the HTML to markdown in my code to be passed down to this package. Generate markdown seems to be correct..
Among the formats /toolbar that i am using, only the blockquote for single line doesn't work. Rest of things work nicely!

function parseBlockquote(element: marked.Tokens.Blockquote): KnownBlock[] { return element.tokens .filter( (child): child is marked.Tokens.Paragraph => child.type === 'paragraph' ) .flatMap(p => parseParagraph(p).map(block => { if (isSectionBlock(block) && block.text?.text) { block.text.text = block.text.text .split('\n') .map(line => '> ' + line) .join('\n'); } return block; }) ); }

this fix works when i tried to fork the repo but then some other formats like bold/italic/strike fails..
Is it possible to fix the blockquote format in your repo?

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

No branches or pull requests

1 participant