sentry-docs icon indicating copy to clipboard operation
sentry-docs copied to clipboard

Diff code blocks have different padding from normal code blocks

Open szokeasaurusrex opened this issue 1 year ago • 2 comments

Steps to Reproduce

  1. Create a normal code block on a docs page, for example:
```python
def hello_world():
    print("hello_world")

hello_world()
print("done")
```
  1. Create a diff code block on a docs page, for example:
```python diff
def hello_world():
-     print("hello_world")
+     print("Hello, world!")

hello_world()
- print("done")
+ print("Done!")
 ```

Expected Result

Both code blocks have the same padding

Actual Result

The blocks have different padding. This example, which is the rendered preview of #10508, demonstrates the problem.

Additional Info

No response

szokeasaurusrex avatar Jun 26 '24 14:06 szokeasaurusrex

I believe the ideal should be one extra column on the left (a space or +/-) with the same padding as normal code

wyt @szokeasaurusrex?

a-hariti avatar Jun 28 '24 11:06 a-hariti

this code block:

 def hello_world():
+    print("hello_world")
-    print("Hello, world!")

produces: Screenshot 2024-06-28 at 12 30 37 which is inline with a non diff code block

normal code blocks Screenshot 2024-06-28 at 12 33 02

a-hariti avatar Jun 28 '24 11:06 a-hariti