Giter Site home page Giter Site logo

Syntax highlighting about 0bin HOT 3 CLOSED

tygs avatar tygs commented on July 21, 2024
Syntax highlighting

from 0bin.

Comments (3)

sametmax avatar sametmax commented on July 21, 2024

Code highlighting is already supported (see: http://0bin.net/paste/3f3d571410ab9e7abb52081d4c525b03f4068224#R4jRi3uXj+B9/+MiNOcrfpnX9S31oaH0rD9JzB3j1WU=)

We can't use something more advanced such as pygments since it's a server side technology and the server doesn't have access to the paste content.

What's more, it's really important that a person can just do the bare minimum to create a paste. Selecting a specific language to highlight the matching syntax is an additional step.

from 0bin.

 avatar commented on July 21, 2024

Fair enough on Pygments.

Now that I've pasted a few more things I see that 0bin's syntax highlighting is damn near broken. It does it for flat file databases used for various configuration files for Linux for instance, and sometimes chooses the wrong language.

I'd much rather there is a two-step process that actually works, plain text being the default. Retain the 'Upload File' option though, that is a very neat idea.

Semi-unrelated: is encoding maintained or is it 'converted' to UTF-8 when you upload files?

from 0bin.

sametmax avatar sametmax commented on July 21, 2024

I'm ok with syntax hilighting being less than perfect. It's not a coding tool, and it's not meant to be something list gist and it's important to me to have a 'one clic => pasted' workflow. But if we can find a way to include it without adding too much to the UI, we can add the option to force a language syntax and use a more serious highlither.

Encoding is untouched because I don't know a way to detect encoding from copy / paste or upload.

from 0bin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.