Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Commit

Permalink
Added documentation via Brocco, replaced toolness refs w/ mozilla.
Browse files Browse the repository at this point in the history
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
toolness committed Dec 9, 2012
1 parent ff13816 commit 61b4092
Show file tree
Hide file tree
Showing 12 changed files with 2,037 additions and 22 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

4 changes: 0 additions & 4 deletions demo/editor/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2>HTML Source</h2>
<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>
Expand Down
21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -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>
8 changes: 4 additions & 4 deletions slowparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down Expand Up @@ -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. */
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions spec/errors.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion test/test-slowparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
Expand Down
Loading

0 comments on commit 61b4092

Please sign in to comment.