The discussion revolves around maintaining tables from HTML emails when using HTML to Markdown conversion in Discourse. Currently, tables get mangled and converted to plaintext. mcwumbly suggests skipping tables and maintaining them as HTML, while codinghorror mentions that Markdown table support might improve the situation.
vinothkannans explains that the issue lies in the server-side HTML to Markdown conversion, which doesn’t support Markdown tables yet. However, the client-side JavaScript conversion does support it. zogstrip proposes removing the Ruby version and replacing it with the JavaScript version to avoid code duplication.
Users brechtm and mcwumbly experience issues with tables breaking off messages during conversion. Editing and pasting raw HTML tables seems to work as a workaround. zogstrip mentions that tables will be properly converted once a specific PR is merged: https://github.com/discourse/discourse/pull/9586.
I was trying to advise a user on how they might import a Google Doc into Discourse as a new topic and suggested trying to copy/paste the doc into an email and then email it in. It mostly worked, but there were a few tables in the doc that got mangled in the process.
When an email into Discourse includes an HTML table, that table gets mangled and turned into plaintext on the Discourse side.
I have the incoming_email_prefer_html on as well as the “allow html tables” setting.
It’d be cool if tables were just skipped and maintained as HTML in that case. (Or perhaps there’s a table extension we’re planning on enabling once the markdown-it is in the mix?)
Yes, it will work better if the user used copy-paste method instead of email-in workaround.
HTML pasting feature uses client side JavaScript for Markdown conversion. But for incoming emails we converting it in server side using our custom converter which doesn’t support Markdown tables yet.
우연히 표가 포함된 이메일을 받는데, 첫 번째 표와 그 뒤에 오는 내용은 마크다운으로 변환되는 과정에서 사라집니다. 이로 인해 메시지가 갑자기 끊기는 현상이 발생하여 사용자들에게 매우 혼란을 줍니다. 작은 봉투 아이콘을 클릭하면 원본 HTML 이메일을 읽을 수 있지만, 이는 사용자 친화적이지 않으며 버그로 간주되어야 할 것입니다.
메시지를 편집하여 원시 HTML 표를 그대로 붙여넣으면 잘 작동합니다. 마크다운 변환 과정에서도 이렇게 하면 안 될까요?