Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
Github Markdown Scratchpad
==========================
# GitHub Markdown Scratchpad

This is a quick side-by-side markdown editor using Github flavored markdown. It uses [Marked](https://github.com/chjj/marked) for markup generation. There are still a handful of issues between marked and true github flavored markdown but it's a very close approximation.
This is a quick side-by-side markdown editor using GitHub flavored markdown. It uses
[Marked](https://github.com/chjj/marked) for markup generation. There are still
a handful of issues between marked and true GitHub flavored markdown but it's a
very close approximation.

Demo
----
See also [Writing on GitHub](https://help.github.com/categories/writing-on-github/)

http://github-scratchpad.herokuapp.com/
## Demo

[GitHub Markdown Scratchpad](http://github-scratchpad.herokuapp.com/)

## Installation

Installation
------------
```
git clone git://github.com/pcorliss/github-scratchpad.git
cd github-scratchpad
npm install
node app.js
```

Please Don't Sue Me
-------------------
## Please Don't Sue Me

The CSS is copied from github's site wholesale to give the text the appropriate look and feel.
The CSS is copied from GitHub's site wholesale to give the text the appropriate
look and feel.

This project is not affiliated with Github in any way, shape, or form.
This project is not affiliated with GitHub in any way, shape, or form.
2 changes: 1 addition & 1 deletion public/google61d87d1e4be3a9c2.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
google-site-verification: google61d87d1e4be3a9c2.html
google-site-verification: google61d87d1e4be3a9c2.html
12 changes: 6 additions & 6 deletions public/javascripts/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var renderers = {
};

var currentRenderer = 'local';
var remainingGithub = '?';
var remainingGitHub = '?';

$(function() {
var htmlTarget = $('#htmlTarget');
Expand Down Expand Up @@ -33,9 +33,9 @@ $(function() {
htmlTarget.html(data);
var rateLimit = request.getResponseHeader('X-RateLimit-Remaining');
if(rateLimit) {
remainingGithub = rateLimit;
remainingGitHub = rateLimit;
}
renderGithubRateLimit();
renderGitHubRateLimit();
},
error: function(data, textStatus){
console.error(data, textStatus);
Expand All @@ -46,9 +46,9 @@ $(function() {
var debouncedMarkdownChanged = _.debounce(markdownChanged, 300);
markdownChanged();

var renderGithubRateLimit = function() {
var renderGitHubRateLimit = function() {
console.log("");
$('.githubRateLimit').text(remainingGithub + " Github API calls remaining in this hour.");
$('.githubRateLimit').text(remainingGitHub + " GitHub API calls remaining in this hour.");
};

var setRenderer = function(name) {
Expand All @@ -59,7 +59,7 @@ $(function() {
$('#markdownSource').bind('keyup change', debouncedMarkdownChanged);
} else {
$('#markdownSource').unbind();
renderGithubRateLimit();
renderGitHubRateLimit();
}
};

Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ body
width: 47%
display: block
float: left

textarea#markdownSource
width: 100%
min-height: 1200px
Expand Down
2 changes: 1 addition & 1 deletion routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.index = function(req, res){
console.error("Could not open file: %s", err);
}
res.render('index', {
title: 'Github Markdown Scratchpad',
title: 'GitHub Markdown Scratchpad',
sample_text: data
});
});
Expand Down
23 changes: 14 additions & 9 deletions sample_text.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
Github Markdown Scratchpad
==========================
# GitHub Markdown Scratchpad

This is a quick side-by-side markdown editor using Github flavored markdown. It uses [Marked](https://github.com/chjj/marked) for markup generation. There are still a handful of issues between marked and true github flavored markdown but it's a very close approximation.
This is a quick side-by-side markdown editor using GitHub flavored markdown. It
uses [Marked](https://github.com/chjj/marked) for markup generation. There are
still a handful of issues between Marked and true GitHub flavored markdown but
it's a very close approximation.

If you'd like to contribute feel free to submit pull requests and issues via the [github repo](https://github.com/pcorliss/github-scratchpad).
If you'd like to contribute feel free to submit pull requests and issues via the
[GitHub repo](https://github.com/pcorliss/github-scratchpad).

If you have questions please feel free to send me an email. [pcorliss@gmail.com](mailto:pcorliss@gmail.com)
If you have questions please feel free to send me an email.
[pcorliss@gmail.com](mailto:pcorliss@gmail.com)

The CSS is copied from github's site wholesale to give the text the appropriate look and feel.
The CSS is copied from GitHub's site wholesale to give the text the appropriate look
and feel.

This page is not affiliated with github in any way shape or form.
This page is not affiliated with GitHub in any way shape or form.

The section below was originally posted at https://github.com/mojombo/github-flavored-markdown/issues/1

GitHub Flavored Markdown
================================

Originally from https://github.com/mojombo/github-flavored-markdown/issues/1

*View the [source of this content](http://github.github.com/github-flavored-markdown/sample_content.html).*

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Expand Down
2 changes: 1 addition & 1 deletion views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ block content
a.brand= title
.nav-collapse.collapse
ul.nav
a.contribute(href="https://github.com/pcorliss/github-scratchpad") Contribute on Git
a.contribute(href="https://github.com/pcorliss/github-scratchpad") Contribute on GitHub

.container-fluid
.row-fluid
Expand Down