Avoid copying diffs as Markdown tables
Under certain circumstances with Chrome, copying a diff and pasting it in a Markdown block could format the code in a Markdown table instead of preserving the existing format. It appears that Chrome copies each diff row as a single table, while browsers such as Firefox create separate tables for rows. The table detector could be fooled if the right number of columns and rows appeared in the paste buffer. To fix this issue, we disable the auto-table formatting if the table originated from a diff. Closes https://gitlab.com/gitlab-org/gitlab/-/issues/213033
Showing
Please register or sign in to comment