Permalink
Browse files

Whoops, support new JSON for MD, too

  • Loading branch information...
1 parent 3ca0863 commit c3a6d1d36c42d6bcb38139a8cb1a839c2005beee @gjtorikian committed Sep 18, 2012
Showing with 5 additions and 5 deletions.
  1. +2 −1 .gitignore
  2. +2 −3 lib/panino/plugins/parsers/markdown.js
  3. +1 −1 package.json
View
@@ -15,4 +15,5 @@ out.txt
.cache/
nodemanual/
tests/dump
-tests/test_out
+tests/test_out
+check_apf.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
@@ -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"

0 comments on commit c3a6d1d

Please sign in to comment.