Permalink
Browse files

Added documentation via Brocco, replaced toolness refs w/ mozilla.

Information about Brocco: http://toolness.github.com/brocco/

Also got rid of demo/editor/index.html, since it was a stub and I doubt
anything references it anymore.
  • Loading branch information...
1 parent ff13816 commit 61b409266980faa27eb6743f3716f4f6b30c8605 @toolness committed Dec 9, 2012
Showing with 2,037 additions and 22 deletions.
  1. +6 −6 README.md
  2. +0 −4 demo/editor/index.html
  3. +1 −1 demo/index.html
  4. +21 −0 index.html
  5. +4 −4 slowparse.js
  6. +3 −3 spec/errors.jquery.js
  7. +3 −3 spec/index.html
  8. +1 −1 test/test-slowparse.js
  9. +443 −0 vendor/brocco.js
  10. +192 −0 vendor/docco.css
  11. +67 −0 vendor/jump-to.js
  12. +1,296 −0 vendor/showdown.js
View
@@ -23,11 +23,11 @@ For more information, see:
[X-Ray Goggles]: http://hackasaurus.org/goggles/
[lovebomb mockups]: http://jessicaklein.blogspot.com/2012/03/iterating-on-bombs.html
[webmaker tutorials]: http://www.toolness.com/wp/2012/03/webmaker-tutorial-prototyping/
- [error reporting specification]: http://toolness.github.com/slowparse/spec/
- [live demo]: http://toolness.github.com/slowparse/demo/
- [slowparse.js]: http://labs.toolness.com/temp/slowparse/docs/slowparse.html
- [tree-inspectors.js]: http://labs.toolness.com/temp/slowparse/docs/tree-inspectors.html
- [spec/errors.jquery.js]: http://labs.toolness.com/temp/slowparse/docs/errors.jquery.html
- [test suite]: http://toolness.github.com/slowparse/test/
+ [error reporting specification]: http://mozilla.github.com/slowparse/spec/
+ [live demo]: http://mozilla.github.com/slowparse/demo/
+ [slowparse.js]: http://mozilla.github.com/slowparse/
+ [tree-inspectors.js]: http://mozilla.github.com/slowparse/?tree-inspectors.js
+ [spec/errors.jquery.js]: http://mozilla.github.com/slowparse/?errors.jquery.js
+ [test suite]: http://mozilla.github.com/slowparse/test/
[learning]: http://www.toolness.com/wp/2012/04/learning-and-grammatical-forgiveness/
View
@@ -1,4 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Editor Moved!</title>
-<p>The editor has been moved <a href="http://toolness.github.com/friendlycode/">here</a>.</p>
View
@@ -56,7 +56,7 @@
<textarea class="html">&lt;p class="foo"&gt;hi&lt;/i&gt;</textarea>
</div><div class="column">
<h2>DOM Diagram</h2>
- <aside>This is the DOM generated by <a href="https://github.com/toolness/slowparse">slowparse</a>. Mouse over different parts to see where they correspond in the original source.</aside>
+ <aside>This is the DOM generated by <a href="..">slowparse</a>. Mouse over different parts to see where they correspond in the original source.</aside>
<div class="rendered-dom"></div>
</div><div class="column">
<h2>DOM Rendering</h2>
View
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="stylesheet" href="vendor/docco.css">
+<title></title>
+<div id="container">
+ <div id="background"></div>
+ <div id="jump_to">
+ Jump To &hellip;
+ <div id="jump_wrapper">
+ <div id="jump_page">
+ <a class="source">slowparse.js</a>
+ <a class="source">tree-inspectors.js</a>
+ <a class="source">spec/errors.jquery.js</a>
+ </div>
+ </div>
+</div>
+<script src="vendor/showdown.js"></script>
+<script src="vendor/codemirror2/lib/codemirror.js"></script>
+<script src="vendor/codemirror2/mode/javascript/javascript.js"></script>
+<script src="vendor/brocco.js"></script>
+<script src="vendor/jump-to.js"></script>
View
@@ -23,8 +23,8 @@
// and CSS parsers while maintaining a single token stream.
//
// [RequireJS]: http://requirejs.org/
-// [error specification]: http://toolness.github.com/slowparse/spec/
-// [README]: https://github.com/toolness/slowparse#readme
+// [error specification]: spec/
+// [README]: https://github.com/mozilla/slowparse#readme
var Slowparse = (function() {
// ### Character Entity Parsing
//
@@ -94,7 +94,7 @@ var Slowparse = (function() {
// `type` property. For more information on each type of error,
// see the [error specification][].
//
- // [error specification]: http://toolness.github.com/slowparse/spec/
+ // [error specification]: spec/
var ParseErrorBuilders = {
/* Create a new object that has the properties of both arguments
* and return it. */
@@ -1356,7 +1356,7 @@ var Slowparse = (function() {
// an error object if an error is detected, or `undefined` otherwise.
// This can be used for further error checking on the parsed document.
//
- // [error specification]: http://toolness.github.com/slowparse/spec/
+ // [error specification]: spec/
HTML: function(document, html, errorDetectors) {
var stream = new Stream(html),
domBuilder,
View
@@ -6,8 +6,8 @@
//
// For examples of this plugin in use, consult its [test suite][].
//
-// [spec]: http://toolness.github.com/slowparse/spec/
-// [test suite]: https://github.com/toolness/slowparse/blob/gh-pages/test/test-errors.jquery.js
+// [spec]: spec/
+// [test suite]: https://github.com/mozilla/slowparse/blob/gh-pages/test/test-errors.jquery.js
(function(jQuery) {
var $ = jQuery;
@@ -83,7 +83,7 @@
// global selection of templates from `jQuery.errorTemplates` will
// be used.
//
- // [spec]: http://toolness.github.com/slowparse/spec/
+ // [spec]: spec/
fillError: function(error, templates) {
var selector = ".error-msg." + error.type;
var template = (templates || $.errorTemplates).filter(selector);
View
@@ -96,10 +96,10 @@
</style>
<h1>Slowparse Error Reporting Specification</h1>
<p>All of the following documentation is generated on-the-fly,
- in your browser, by <a href="http://labs.toolness.com/temp/slowparse/docs/slowparse.html">slowparse.js</a> and <a href="http://labs.toolness.com/temp/slowparse/docs/errors.jquery.html">errors.jquery.js</a>. If something looks amiss, run the actual
- output against the expected results at the <a href="../test/">test sute</a>;
+ in your browser, by <a href="../?slowparse.js">slowparse.js</a> and <a href="../?errors.jquery.js">errors.jquery.js</a>. If something looks amiss, run the actual
+ output against the expected results at the <a href="../test/">test suite</a>;
if errors are reported, please feel free to
- <a href="https://github.com/toolness/slowparse/issues">file a bug</a>.</p>
+ <a href="https://github.com/mozilla/slowparse/issues">file a bug</a>.</p>
<p>You can also consult the <a href="../demo/">live demo</a> to see this error
reporting used in an interactive widget.</p>
<div id="templates" style="display: none">
View
@@ -49,7 +49,7 @@ test("parsing of HTML comments", function() {
});
test("UNQUOTED_ATTR_VALUE in <h2><span start=</h2>", function() {
- // https://github.com/toolness/slowparse/issues/6
+ // https://github.com/mozilla/slowparse/issues/6
var err = Slowparse.HTML(document, '<h2><span start=</h2>').error;
equal(err.type, "UNQUOTED_ATTR_VALUE");
});
Oops, something went wrong.

0 comments on commit 61b4092

Please sign in to comment.