-
Notifications
You must be signed in to change notification settings - Fork 59
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
Convert simple tables to Markdown tables #75
Comments
I just started using your add-on, works great for the most part! I actually just wrote a small bash script for generating the TOC before spotting this issue. I'll take a look at your code and contribute if I can wrap my head around it. |
@rgschmitz1: Are you generating a Markdown TOC from the headings? That's a different issue from the Markdown tables, but also an interesting one. I have not thought about the Markdown/HTML table issue for a while, but it's certainly an interesting problem. (Though I have not pursued it much because the HTML tables can handle any kind of formatting, while Markdown tables are rather limited.) Also, if you find the code bewildering, give me a holler, and I can try and remember what my logic (or lack thereof) was :) |
Oops, I misunderstood this issue. Markdown tables do seem pretty limited in GitHub at least. I am generating the TOC from headers, thankfully your tool left a clear marker ([TOC]). There's a bunch of scripts for this but I was hoping to make something a little less complicated for personal use. |
Yeah, when I originally wrote this add-on, we were generating a TOC server-side (via some JavaScript), triggered by the [TOC] directive. I don't have access to that server or code anymore, but I suppose it would be possible to do something in the add-on itself based on the headings. Maybe I'll create a separate issue for that one. |
It's been quite a while, is this issue still open? |
Sure -- I have not spent much thought on this recently, but if you have some ideas, this bug is still open. Check out https://github.com/evbacher/gd2md-html/blob/master/dev.md -- specifically on the testing and verification. It's best if changes and enhancements do not break any existing functionality or create any obvious new bugs. One other issue is if attempting to create Markdown tables significantly increases the computation time, that's not a good thing either, though it would probably only affect docs that are table-heavy. Worth testing though. |
I'd also like to have this feature. When creating a very simple table, I'd like to convert it to the "|" table markdown syntax so ChatGPT understands it (supposedly!) better. |
There are no complicated tables in my document, just tables for taking notes. I really need this feature. Thank you. |
+1 for Markdown table support I am using Redmine, which has some Markdown support, but doesn't support HTML tags in Markdown-enabled fields. :-( |
While Markdown tables seem simple, converting them from a Google Doc is not simple, so this is not an easy enhancement. We are working on some enhancements, and this is on the list, but I cannot promise that it will be a quick fix. Thanks for your patience! (And remember that HTML is valid Markdown.) |
Currently, Docs to Markdown converts all tables to HTML tables, which is also valid in Markdown files. But some simple tables could be converted to Markdown tables, and they would be more readable in source form.
We could probably start converting all tables to both Markdown and HTML, and if we run into something that is too complex (almost anything is too complex for Markdown tables), then we render the HTML table (and stop constructing the Markdown table).
This is complicated though -- will require some thought about what will trigger the change to HTML-only. If anyone wants to explore this, let me know.
The text was updated successfully, but these errors were encountered: