HappenApps / Quiver

Quiver documentation and issue tracker
2.26k stars 109 forks source link

[Feature Request] colored output from Terminal (example git diff) #996

Open GETandSELECT opened 6 years ago

GETandSELECT commented 6 years ago

When I copy and paste git diff output (colored output), the colors get lost in Quiver.

background info https://superuser.com/questions/229022/copy-colored-output-from-mac-os-x-terminal

zeewinpeng commented 6 years ago

You can use markdown highlighting code block:

    ```diff
    diff --git a/lzw/__init__.py b/lzw/__init__.py
    index 24dc835..21cc9dc 100644
    --- a/lzw/__init__.py
    +++ b/lzw/__init__.py
    @@ -109,7 +109,7 @@ class ByteEncoder(object):
         >>> decoding = dec.decodefrombytes(encoded)
         >>> decoded = b"".join(decoding)
         >>> decoded == bigstr
    -    True
    +    OTrue
Renders to:
```diff
diff --git a/lzw/__init__.py b/lzw/__init__.py
index 24dc835..21cc9dc 100644
--- a/lzw/__init__.py
+++ b/lzw/__init__.py
@@ -109,7 +109,7 @@ class ByteEncoder(object):
     >>> decoding = dec.decodefrombytes(encoded)
     >>> decoded = b"".join(decoding)
     >>> decoded == bigstr
-    True
+    OTrue
notoriousturtle commented 6 years ago

I would like to see this just for general terminal output as well. Something where it would keep the formatting, and colouring taken directly from Terminal.

skrodal commented 6 years ago

Hi @GETandSELECT & @notoriousturtle — I tried this with Terminal app, and found that all formatting is kept when pasting into text cell (even black background).

With iTerm, however, the result is plain text.

With Markdown, you can also use ```sh for basic syntax coloring.