Display after saving and more syntax highlighting
Describe the bug I noticed that uploaded files are no longer displayed correctly. No syntax highlighting and no more new lines.
I also noticed the syntax highlighting isn't that good overall. Some languages are not supported entirely (CSharp) and others have just two colors (js, json). Would be nice if the syntax highlighting is like in github.
To Reproduce Steps to reproduce the behavior:
- Upload a file (I've tested it with a simple hello world c# file)
- save it
Expected behavior Preview should display it correctly. (Syntax highlighting, new lines and so on)
Screenshots
CSharp File (Preview)
CSharpFile (RAW)
Json File (Preview)
Json File (RAW)

Desktop (please complete the following information):
- OS: Windows 11
- Browser firefox
- Version 100.0
Additional context Code to copy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
Console.ReadLine();
}
}
}
{
"Hello": "World",
"Integer": 123.45,
"BoolTrue": true,
"BoolFalse": false
}
bump
I'm currently in the process of refactoring Drift and improved highlighting is one of my goals. It's an easy fix -- the current code strips out styles because I intended to add them on the client.