3 ms·
I would totally use this over GitHub Gists if this worked for file formats other than markdown, where you could specify the syntax highlighting language. Of cou
by turboponyy 5y ago
I would totally use this over GitHub Gists if this worked for file formats other than markdown, where you could specify the syntax highlighting language. Of course, you could just wrap your text in ```py ```, for example, but that would mean the raw text would be altered (and would likelt become invalid). This is far from trivial to implement, I would assume.
- MaxLeiter 5y agoYep, thats totally planned. I’m also intending to allow uploading of text files so you can use it for sharing entire directories / small projects
- MaxLeiter 5y agoin the off-chance you see this, I added this + drag and drop file uploading which leads to a very nice workflow: https://twitter.com/max_leiter/status/1502428528855322624 https://twitter.com/max_leiter/status/1502428528855322624
- turboponyy 5y agoHi, thanks for your reply! It might be more appropriate to create these as issues in your repo, but I wanted to get back to you. The first extension I tried was .py and there was no highlighting for that, which I found a bit odd considering how common it is. I then tried .java and that worked nicely. It seems that you allow creating files with empty filenames, is that intended? The demo server returns a 500 when trying to create an item with an empty title. You might also want to consider allowing the user to specify the highlighting themselves. For example, I might want to specify .bash highlighting for a file with the filename `.bashrc`.
- MaxLeiter 5y agoThanks for the 500 error, I'll get to it! Supporting empty file names is intended, mostly for the use-case of single file pastes, as I do require a post title. I've completely revamped the code rendering to be server-side the past few days, so I think your problem is fixed. I put an example py here: https://paste.maxleiter.com/post/3da13a78-d9d0-47cb-a657-33802440926f https://paste.maxleiter.com/post/3da13a78-d9d0-47cb-a657-338... Specifying filenames is something I've thought of, but I think I'd rather keep the UI free of more buttons and just hardcode .bash{rc} => bash on the server.