“Shorten” button not working

Petar Petar
Wed Nov 6 11:47:58 UTC 2019

On Tuesday, 5 November 2019 at 18:13:45 UTC, Ogi wrote:
> Perhaps some script is missing?

I strongly recommend using the Export Gist button, followed by 
Import Gist, as it's a technically superior way of sharing a code 

The URL shortening works by URL encoding the source code and then 
passing it to a URL-shortening service. There are at least 2 
problems with that:
1. There are limitations on the length of the URL and in general 
encoding large data is ugly.
2. There are no guarantees that the URL-shortening service will 
persist the URLs indefinitely.

Gists are superior method because:
1. Anyone with a GitHub account can create them.
2. The source code stored in one gist can be much greater than 
what can be reasonably URL-encoded.
3. Gists supported versioning.
4. Gists support multiple files. At the moment this functionality 
is not available on Dlang Tour /, but I plan to 
implement it in the future.

That said, I am considering changing the Shorten button to use 
gists under the hood. If people want to further shorten the 
links, of course this is fine by me, and they can use any 
third-party service and browser extension to do that.

More information about the Digitalmars-d mailing list