dataguide icon indicating copy to clipboard operation
dataguide copied to clipboard

Diff highlighting sometimes accidentally applied to code blocks

Open imchairmanm opened this issue 4 years ago • 3 comments

Since code blocks automatically apply highlighting to lines beginning with +, -, and |, sometimes the styling is applied to code blocks where it doesn't make sense.

For instance, in SQL files, single line comments marked with two dashes --. Another example is that psql uses a line of dashes to separate labels from values. These are interpreted as diff line removal highlighting, however:

Screenshot from 2020-06-22 14-18-03

It'd be helpful to be able to disable this or to have it be enabled by a property you can add manually instead of automatically applying when one of those characters are at the start of a line.

imchairmanm avatar Jun 24 '20 16:06 imchairmanm

Possible workaround: I noticed the bug in the highlighting of the tables, that the separator between header and data always is highlighted red. I tried a quick idea in a PR: https://deploy-preview-71--dataguide.netlify.app/postgresql/reading-and-querying-data/filtering-data#conclusion (above the "Conclusion headline"). Adding a space in front of all the lines of the table output could avoid that bug if it is not going to be fixed soon: https://github.com/prisma/dataguide/pull/71

janpio avatar Sep 14 '20 16:09 janpio

Just looking through some older issues. This is still unresolved.

I don't know if we've ever purposefully used the diff highlighting for content in the Data Guide so I'd be happy if we just disabled / removed it if that's the easiest solution.

imchairmanm avatar Dec 01 '22 15:12 imchairmanm

(Same problem exists in docs)

janpio avatar Dec 01 '22 19:12 janpio