Skip to content

Display after saving and more syntax highlighting #115

Description

@XeroxDev

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:

  1. Upload a file (I've tested it with a simple hello world c# file)
  2. save it

Expected behavior
Preview should display it correctly. (Syntax highlighting, new lines and so on)

Screenshots
CSharp File (Preview)
image
CSharpFile (RAW)
image
Json File (Preview)
image
Json File (RAW)
image

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions