Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Whoops, support new JSON for MD, too

  • Loading branch information...
commit c3a6d1d36c42d6bcb38139a8cb1a839c2005beee 1 parent 3ca0863
@gjtorikian authored
View
3  .gitignore
@@ -15,4 +15,5 @@ out.txt
.cache/
nodemanual/
tests/dump
-tests/test_out
+tests/test_out
+check_apf.js
View
5 lib/panino/plugins/parsers/markdown.js
@@ -36,7 +36,7 @@ function parse_markdown(file, options, callback) {
return;
}
var sourceLines = source.split("\n");
- var metaExpr = /\(metadata\s*:\s*([^=]+):([^\-]+)\)\n*/g;
+ var metaExpr = /\{(([\"\']).+\1\s*:\s*[\"\'].+\1)\}/g;
var metaString;
var firstClass = {
@@ -53,10 +53,9 @@ function parse_markdown(file, options, callback) {
process.exit(0);
}
- metaString = metaString[0].replace("(", "{").replace(")", "}").replace("metadata", '"metadata"');
var metaJson = JSON.parse(metaString);
- if (metaJson.metadata.type == 'misc') {
+ if (metaJson.type == 'misc') {
var title = sourceLines[0].substr(2).replace(/(\w) /g, "$1");
sourceLines[0] = "/** section: " + title + "\n";
sourceLines[1] = "* class " + title;
View
2  package.json
@@ -1,6 +1,6 @@
{
"name" : "panino",
- "version" : "2.0.17",
+ "version" : "2.0.18",
"description" : "API documentation generator with a strict grammar",
"keywords" : [
"api", "doc", "apidoc", "documentation", "pdoc", "ndoc"
Please sign in to comment.
Something went wrong with that request. Please try again.