Conversation
… parsing after a failed table
…ave the traling |
…caping | within code tags
Contributor
|
Wow, you're so efficient! My fork of markd(missing.style branch) do git rebased on @ralsina 's Check github rendered original markdown file here and rendered page here Not as good as github rendered table (no border, and no interlaced background colors), but it's works! Following is github version, |
Contributor
Author
|
All those visual differences are CSS, the generated HTML is the same.
…On Mon, Feb 24, 2025 at 2:03 AM Billy.Zheng ***@***.***> wrote:
Wow, you're so efficient!
My fork of markd(missing.style branch)
<https://github.com/zw963/markd/tree/missing.style> now based on @ralsina
<https://github.com/ralsina> 's table-support branch now, and i change my
old aweful table to use new markdown syntax, it works!
Check original markdown here
<https://github.com/crystal-china/website/blob/master/markdowns/for_advanced_rubyists/methods.md>
and rendered page here
<https://crystal-china.org/docs/for_advanced_rubyists/methods>
Not as good as github rendered table (no border, and no interlaced
background colors), but it's works!
image.png (view on web)
<https://github.com/user-attachments/assets/261ac0da-fdc9-4c50-8a3c-dae6beafb831>
—
Reply to this email directly, view it on GitHub
<#72 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMK66DES5LOXZSYQOWNT2RKR2FAVCNFSM6AAAAABXWHYYIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGQ2DGNRTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: zw963]*zw963* left a comment (icyleaf/markd#72)
<#72 (comment)>
Wow, you're so efficient!
My fork of markd(missing.style branch)
<https://github.com/zw963/markd/tree/missing.style> now based on @ralsina
<https://github.com/ralsina> 's table-support branch now, and i change my
old aweful table to use new markdown syntax, it works!
Check original markdown here
<https://github.com/crystal-china/website/blob/master/markdowns/for_advanced_rubyists/methods.md>
and rendered page here
<https://crystal-china.org/docs/for_advanced_rubyists/methods>
Not as good as github rendered table (no border, and no interlaced
background colors), but it's works!
image.png (view on web)
<https://github.com/user-attachments/assets/261ac0da-fdc9-4c50-8a3c-dae6beafb831>
—
Reply to this email directly, view it on GitHub
<#72 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMK66DES5LOXZSYQOWNT2RKR2FAVCNFSM6AAAAABXWHYYIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGQ2DGNRTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
Author
|
Indeed. Fixed in latest commit.
…On Mon, Feb 24, 2025 at 11:47 AM Margret Riegert ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/markd/rules/table.cr
<#72 (comment)>:
> + if lines.size < 2 || !lines[1].match(SEPARATOR_REGEX) ||
+ row_sizes.size != 1
+ # Not enough table or a broken table.
+ # We need to convert it into a paragraph
+ # I am fairly sure this is not supposed to work
+ container.type = Node::Type::Paragraph
+ # Patch the text to have the leading |s
+ container.text = original_text
+ return
+ end
+
+ max_row_size = row_sizes[0]
+ has_body = lines.size > 2
+ container.data["has_body"] = has_body
+
+ alignments = lines[1].strip.strip("|").split(/(?<!\\)\|/).map do |cell|
nitpick: would it be useful to put this regex in a const as we're using it
in several places?
—
Reply to this email directly, view it on GitHub
<#72 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMK7KB5IIXNGRJB2JILL2RMWJTAVCNFSM6AAAAABXWHYYIOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMZXGM3TSOBXGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
Owner
|
It is big move forward, ready to merge it? |
nobodywasishere
approved these changes
Feb 27, 2025
Contributor
Author
|
I think so!
…On Thu, Feb 27, 2025, 6:56 AM icyleaf ***@***.***> wrote:
It is big move forward, ready to merge it?
—
Reply to this email directly, view it on GitHub
<#72 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMK74H2YGMFISG7L3XI32R3OLHAVCNFSM6AAAAABXWHYYIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBXGQ2DKNJSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: icyleaf]*icyleaf* left a comment (icyleaf/markd#72)
<#72 (comment)>
It is big move forward, ready to merge it?
—
Reply to this email directly, view it on GitHub
<#72 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMK74H2YGMFISG7L3XI32R3OLHAVCNFSM6AAAAABXWHYYIOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBXGQ2DKNJSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Contributor
Author
|
Yay!
…On Thu, Feb 27, 2025, 10:24 PM icyleaf ***@***.***> wrote:
Merged #72 <#72> into master.
—
Reply to this email directly, view it on GitHub
<#72 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAMKYDWPUDECVGJ4TPXKL2R63GXAVCNFSM6AAAAABXWHYYIOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJWGUYDKNBSGE4TIOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.



Working implementation.
There seems to be a bug in markd about escaping characters inside
<code>which prevents the "Escaped pipes" test from passing but it's unrelated to table support.It passes the tests in the gfm suite related to tables except those that rely on a working escaping support.
There is one regression test failing, need to look into it.I consider this finished :-)