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

Replace newlines with HTML line breaks in table cells #276

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

Conversation

conscienceli
Copy link

Description

This PR addresses an issue where newline characters in table cells were breaking the markdown table structure. By replacing \n with <br>, we maintain the visual line breaks within cells while preserving the overall table format.

Changes made

  • Added a list comprehension to process each cell in the table rows
  • Replaced \n with <br> in cells that contain newline characters

Why this change is necessary

Without this change, newline characters in table cells would disrupt the markdown table structure, leading to incorrect rendering of tables in the output. This fix ensures that tables are displayed correctly while maintaining the intended line breaks within cells.

Testing

Please verify that tables containing cells with multiple lines are now rendered correctly in the markdown output.

Let me know if you need any further information or changes to this PR.

This change ensures that the markdown table structure remains intact when cells contain newline characters.
Copy link
Contributor

github-actions bot commented Sep 6, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@conscienceli
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Sep 6, 2024
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.

1 participant