Matrix HTML table helpers and pipe-table Markdown support - #15
Merged
Merged
Conversation
mx_table_html() and mx_send_table() render a data frame, matrix, or list as the conservative table HTML Matrix clients accept: a bare <table> of <tr>/<th>/<td> with no CSS, colspan, rowspan, or custom attributes. mx_send_table() pairs it with a plain-text body for clients that ignore formatted_body. mx_markdown_to_html() gains GitHub-style pipe tables, honouring the :---/:---:/---: alignment row. Adds inst/skills/mx.client/matrix-messaging/SKILL.md.
mx_send_table(header = FALSE) dropped the header from the HTML but mx_table_plain() always emitted column names, so formatted_body and the plain-text body showed different tables. mx_table_plain() now takes header and mx_send_table() passes it through. The markdown rewrite matched only '1.' for ordered lists; main matched '[.)]'. '1)' input silently rendered as a paragraph. Restored, and both markers are now covered -- there were no ordered-list tests at all, which is how the regression got through.
Contributor
Author
|
Both findings confirmed and fixed.
There were no ordered-list tests at all, which is how it got through. Added coverage for both markers, plus 80 tests, 0 failures (markdown 16 to 18, tables 2 to 5). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
mx_table_html()andmx_send_table()render a data frame, matrix, or list as the conservative table HTML Matrix clients accept: a bare<table>of<tr>/<th>/<td>, no CSS, colspan, rowspan, or custom attributes.mx_send_table()pairs it with a plain-textbodyfor clients that ignoreformatted_body.mx_markdown_to_html()gains GitHub-style pipe tables, honouring the:---/:---:/---:alignment row.Adds
inst/skills/mx.client/matrix-messaging/SKILL.md.Two corrections folded in
NEWS. The table helpers had been written into the
# mx.client 0.1.1section, which already shipped to CRAN. Moved to a new0.1.1.2heading so the released notes describe what was actually released.Dropped example. The markdown.R rewrite expanded
mx_pill_mentions'@param/@returnprose but lost its@examplesblock. tinyrox flags it and CRAN wants examples on exported functions, so it's restored.Note
rformat_dir("R")also reflowedR/messages.R, which this branch never touched. The repo was not rformat-clean. That churn is isolated in its own commit.Verification
75 tests pass. The restored example runs clean: