Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
capnmidnight committed Jun 2, 2017
1 parent 65cfdf4 commit 6b31bf7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
26 changes: 16 additions & 10 deletions doc/app.js
Expand Up @@ -119,14 +119,20 @@ function scroller(id) {
for (var i = 0; i < collection.length; ++i) {
var obj = collection[i];
group.items.push(obj);
docoCache["#" + obj.id.trim()] = {
obj: obj,
doc: pliny.formats.html.format(obj) + "<a href=\"javascript:scroller('top')\">top</a>"
};
// This is called "trampolining", and is basically a way of performing
// recursion in languages that do not support automatic tail recursion.
// Which is ECMAScript 5. Supposedly it's coming in ECMAScript 6. Whatever.
stack.push(obj);
try{
docoCache["#" + obj.id.trim()] = {
obj: obj,
doc: pliny.formatters.html.format(obj) + "<a href=\"javascript:scroller('top')\">top</a>"
};
// This is called "trampolining", and is basically a way of performing
// recursion in languages that do not support automatic tail recursion.
// Which is ECMAScript 5. Supposedly it's coming in ECMAScript 6. Whatever.
stack.push(obj);
}
catch(exp) {
console.error(exp);
console.log(obj.id, obj);
}
}
}
}
Expand Down Expand Up @@ -234,7 +240,7 @@ var GRAMMAR_TEST = /^grammar\("(\w+)"\);\r?\n/,
},
"#Global": {
obj: pliny.database,
doc: pliny.formats.html.format(pliny.database)
doc: pliny.formatters.html.format(pliny.database)
}
};
renderDocs();
Expand All @@ -243,4 +249,4 @@ var GRAMMAR_TEST = /^grammar\("(\w+)"\);\r?\n/,
replacePreBlocks();
}
});
})();
})();
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -49,7 +49,7 @@
"iphone-inline-video": "^1.9.3",
"jstransformer-marked": "^1.0.1",
"lavu-details-polyfill": "^0.1.0",
"pliny": "^3.2.6",
"pliny": "^3.4.3",
"promise-polyfill": "^5.2.1",
"three": "^0.85.2"
},
Expand Down
1 change: 1 addition & 0 deletions templates/documentation.pug
Expand Up @@ -4,6 +4,7 @@ append head
<!-- start documentation.pug head append -->
script(src= fileRoot + "node_modules/lavu-details-polyfill/lib/index" + jsExt)
script(src= fileRoot + "node_modules/pliny/pliny" + jsExt)
script(src= fileRoot + "Primrose" + jsExt)
script(src= fileRoot + "doc/Primrose.doc" + jsExt)
<!-- end documentation.pug head append -->

Expand Down

0 comments on commit 6b31bf7

Please sign in to comment.