github-linguist/linguist

Github README diff highlight view integrates poorly with indentation

Closed this issue · 1 comments

Currently, the highlight syntax for diff view is + and -. However, the problem is that they make the content indented by one more space, which would mess up original indentation.

If I have 3 lines with two space indentation:

  a
  b
  c

And when I want to highlight that b is added & c is removed:

 a
+  b
-  c

It seems b and c have one more level of indentation of a.

Is it possible to render +/- outside of the box so that + b still has the same indentation as a?

Currently I have to add two spaces for each line, which makes "copy code" invalid due to excessive spacing.

This has nothing to do with Linguist. The rendering of codeblocks is implemented by https://github.com/github/markup. You should log this issue there.

Closing as this is not something Linguist has control over.