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

make sure there are blank lines around table/figure captions #114

Merged

Conversation

chrispy-snps
Copy link
Collaborator

Fixes #113. Table and figure captions are now covered by unit tests.

The updated output is as follows:

from markdownify import markdownify as md
md('TEXT<table><caption>Caption</caption><tr><td>CELL</td></tr></tbody></table>')  # > 'TEXT\n\nCaption\n| CELL |\n\n'
                                                                                                ^^^^^^^^^

md('TEXT<figure><figcaption>Caption</figcaption><span>SPAN</span></figure>')  # > 'TEXT\n\nCaption\n\nSPAN'
#                                                                                      ^^^^^^^^^^^^^^^

md('<figure><span>SPAN</span><figcaption>Caption</figcaption></figure>TEXT')  # > 'SPAN\n\nCaption\n\nTEXT'
#                                                                                      ^^^^^^^^^^^^^^^

Signed-off-by: chrispy <chrispy@synopsys.com>
@AlexVonB AlexVonB merged commit d5fb0fb into matthewwithanm:develop Mar 26, 2024
1 check failed
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.

Blank lines are missing around figure and table captions
2 participants