Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to link to Markdown/Parsedown comparison on parsedown.org #83

Open
scottchiefbaker opened this issue Feb 2, 2014 · 7 comments
Open

Comments

@scottchiefbaker
Copy link

It would be really helpful for bug reports if there was a way to link the Markdown/Parsedown comparison on parsedown.org with a predefined string.

I'd be happy to write the code if you'd open up the code for it. I'm sure it would be pretty simple.

@erusev
Copy link
Owner

erusev commented Feb 2, 2014

It would be really helpful indeed. I planning on implementing it as soon as 1.0 is done.

@hkdobrev
Copy link
Contributor

hkdobrev commented Feb 4, 2014

I'm sure it would be pretty simple.

I doubt it would be so simple.

  • One way is to use GET. The browsers have a limitation on the URL length though.
  • Another way is to POST the Markdown. But then it would not be linkable.
  • The third way is to use some IDs in the URL and a database. This automatically make it even less easy to implement. It increases costs and storage on the server.

All these solutions involve dealing with caching and the amount of traffic. You need to find a balance between the server availability and the cost unless there aren't some ads which could cover it.

@scottchiefbaker Do you have anything else in mind as a simpler solution?

@wkpark
Copy link
Contributor

wkpark commented Feb 5, 2014

@scottchiefbaker
Copy link
Author

I don't think we're talking about more than 1k of text. You can surely send that in a GET string.

Here is a 6k link. Firefox has no problem with it.

I would definitely do a GET, and encode it with base64. I'd be happy to code it if you'd open up the comparison page code.

@scottchiefbaker
Copy link
Author

@wkpark YES!

Something like that, except for http://parsedown.org/demo

Since we're MOSTLY concerned with Markdown / Parsedown comparisons.

@hkdobrev
Copy link
Contributor

hkdobrev commented Feb 5, 2014

@scottchiefbaker Most browsers limit on 4k. Percent-encoding could bump up the size really quickly.

@wkpark Babelmark is nice, but it limits to 1000 characters. You could not parse the jQuery readme for example.

Also caching. If a link to the demo becomes popular, you cannot parse it every time. You should cache it both server-side and browser-side (e.g. ETag headers).

I guess the GET approach would be best for a start and the database approach in the long run.


One could go even further and build something similar to jsfiddle with forks and collaboration, but for Markdown content. It could be a competitor to Ghost, but for single pages.

@scottchiefbaker
Copy link
Author

@hkdobrev 4k would be WAY more than we'd need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants