How to render ANSI color text in markdown

Viewed 530

I have some text like belows which comes from some log.

2021-11-30T08:28:15.7728097Z ##[group]Run call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
2021-11-30T08:28:15.7729237Z [36;1mcall "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"[0m
2021-11-30T08:28:15.7729938Z [36;1mmvn clean package -P native -DskipTests[0m
2021-11-30T08:28:15.7731200Z [36;1mresources\rcedit-x64.exe target/${APP_NAME}.exe --set-icon resources/app_icon.ico --set-file-version 0.0.1 --set-product-version 0.0.1  --set-version-string ProductName spring-boot-native-image --set-version-string LegalCopyright MIT[0m
2021-11-30T08:28:15.7732572Z [36;1mdir target[0m
2021-11-30T08:28:15.7764946Z shell: C:\Windows\system32\cmd.EXE /D /E:ON /V:OFF /S /C "CALL "{0}""
2021-11-30T08:28:15.7765382Z env:
2021-11-30T08:28:15.7765975Z   APP_NAME: spring-boot-native-image
2021-11-30T08:28:15.7766682Z   JAVA_HOME: C:\hostedtoolcache\windows\GraalVM\java11-windows-amd64-21.3.0\x64
2021-11-30T08:28:15.7767551Z   GRAALVM_HOME: C:\hostedtoolcache\windows\GraalVM\java11-windows-amd64-21.3.0\x64

And I want to render it normally in github markdown, I haved tried

```bash
text here
```

or

```shell
text here
```

or

```cmd
text here
```

But none of them worked as expected.

I tried to cat the text in terminal which support ANSI color, the result is like this.

enter image description here

0 Answers
Related