Conversation
…n be more than 1 row of headers in a table.
|
Thanks for this @stury. I'll try to review this as soon as possible, but in the meantime, if either @christiankm or @john-mueller wants to take a look at this, I think that'd be great - since they worked on the original implementation of tables for Ink. |
christiankm
left a comment
There was a problem hiding this comment.
I dont see any problem adding support for this. Thanks for your contribution!
I am unaware if the standard markdown syntax allows this. As far as I can see the code looks fine.
|
Thanks! I could not find an official call out that Markdown supported this feature either, but using the Mac App Store applications |
|
Curious to hear if our CommonMark expert @john-mueller has any insight on this. Would merging this cause any problems in terms of CommonMark-conformance? |
|
Tables are not part of the CommonMark spec yet, but they are a part of the GitHub-flavored spec, which is merely an extension to CommonMark. The tables @christiankm and I worked on are basically GitHub-flavored, so technically this would be an extension to their extension. I'll do a quick check this weekend that this doesn't break anything related to CommonMark, but I seriously doubt it will, and I think it's purely additive to the GitHub-flavored tables. 👍 |
|
Great, thanks a lot for your insight, guys 🙂 Let's move ahead with this one then, I'll try to have it reviewed sometime during the next week. Cheers 👍 |
|
Just checking in with you to see if you need any other help from me with this PR. It looks like the last comment was from 19 days ago. |
Hi John,
I appreciate you open sourcing this Swift Package! I had a need for it to convert a markdown document I'm creating at work into HTML. This was just about the right ticket for me. One issue I ran into, which the commercial application products
BywordandiA Writerseem to support is that you can have multiple header rows in a Table. Ink doesn't support that. It's hard coded to only accept one row as the header.I've updated the code, to add this functionality.
I think they're fairly lightweight changes:
headertoheaders, and converted its type from aRow?to[Row]?.findHeaderAlignmentRow()to find where the row is for the header separator, and alignment hints in markdown.This update seems to be working well for me now. So I thought I'd send a PR back to you with these changes.
Thanks for this project! Nice and simple to integrate with, and was simple enough to troubleshoot and fix the problem I ran into.
Scott Tury