HtmlToMarkdownParser: Support HTML tables via inline HTML
What does this MR do and why?
This MR adds support HTML tables for Service Desk issues.
See #372301 (comment 1305661067) for more context.
Note that this functionality is still behind feature flag. See [Feature flag] Rollout `service_desk_html_to_te... (#389822 - closed).
Screenshots or screen recordings
GMail | Before | After |
---|---|---|
![]() |
![]() |
![]() |
How to set up and validate locally
- Download MIRO email example: miro_board.eml
- Create
render.rb
# frozen_string_literal: true
path = "miro_board.eml"
html = Mail.new(File.read(path)).parts.first.body.to_s.force_encoding("UTF-8")
puts Gitlab::Email::HtmlToMarkdownParser.convert(html)
- Run
bin/rails runner render.rb
onmaster
and/or this MR - Paste the output into an MR/issue comment and Preview
- See it live in https://gitlab.com/gitlab-examples/ops/incident-setup/everyone/tanuki-inc/-/issues/2603#note_1305622133
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #372301 (closed)
Edited by Peter Leitzen