-
Notifications
You must be signed in to change notification settings - Fork 4
feat(#51): add caption support #52
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
Conversation
Fix [issue KyleKing#51](KyleKing#51): Python Markdown Extensions captions, which are availble in Material for MkDocs, get destroyed when using `--wrap`. The caption ```markdown /// table-caption | 1.5.2 A table with letters. /// ``` was formatted as ```markdown /// table-caption | 1.5.2 A table with letters. /// ``` thus breaking the rendered caption in Material for MkDocs. Now, we detect these captions as a token and avoid losing their delitimers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! I have a few minor comments and would like to see a test for the rendered HTML, but otherwise this looks great and is nearly ready to merge!
Implement comments in PR review by author: - Named capture groups in REs. - Only use `paragraph` in `alt` for captions. - Wrap caption's content in a <p>. - Strip content to get rid of captured newline in caption content.
Thank you very much for the quick and insightful review! I have implemented the suggestions and I see a noticeable improvement. I have left the correct HTML conversation open, in case we want to consider properly capturing things in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good to me and I'll make a release this evening
Fix #51 : Python Markdown Extensions captions, which are availble in Material for MkDocs, get destroyed when using
--wrap
.The caption
was formatted as
thus breaking the rendered caption in Material for MkDocs.
Now, we detect these captions as a token and avoid losing their delitimers.