Skip to content

Commit

Permalink
Get rid of homespun parseMultiLine for dox. Will help with #70.
Browse files Browse the repository at this point in the history
Also fix the .map(path.basename) thing. Closes #89
jbt committed Dec 13, 2015
1 parent a31e7c9 commit 0dbf83a
Showing 4 changed files with 14 additions and 141 deletions.
4 changes: 2 additions & 2 deletions extras/fileSearch/fileSearch.js
Original file line number Diff line number Diff line change
@@ -557,7 +557,7 @@
* Constructs and shows the search box, optionally pre-populated
* with a value for the search field
*
* @param {string,optional} val Pre-populated value for the search field
* @param {string=} val Pre-populated value for the search field
*/
function showSearchBox(val){

@@ -567,7 +567,7 @@

// Create the containing element
var f = document.createElement('div');
f.id = "search";
f.id = 'search';

// Construct some basic HTML
f.innerHTML = [
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -3,18 +3,19 @@
"name": "docker",
"version": "0.2.14",
"dependencies": {
"mkdirp": "0.3.2",
"async": "^1.4.0",
"commander": "0.5.2",
"watchr": "~2.3.3",
"markdown-it": "^4.4.0",
"less": "^2.5.1",
"css": "^2.2.1",
"dox": "^0.8.0",
"ejs": "^2.3.3",
"extend": "^3.0.0",
"async": "^1.4.0",
"highlight.js": "^8.7.0",
"less": "^2.5.1",
"markdown-it": "^4.4.0",
"mkdirp": "0.3.2",
"repeating": "^1.1.3",
"strip-indent": "^1.0.1",
"css": "^2.2.1"
"watchr": "~2.3.3"
},
"bin": {
"docker": "./docker"
10 changes: 5 additions & 5 deletions src/docker.js
Original file line number Diff line number Diff line change
@@ -8,11 +8,11 @@ var watchr = require('watchr');
var async = require('async');
var path = require('path');
var less = require('less');
var dox = require('dox');
var ejs = require('ejs');
var fs = require('fs');

var languages = require('./languages');
var parseMultiline = require('./parseMultiLine');

var md = new MarkdownIt({
html: true,
@@ -417,7 +417,7 @@ Docker.prototype.parseSections = function(data, lang){
// Strip off leading * characters.
multiLine = multiLine.replace(/^[ \t]*\*? ?/gm, "");

jsDocData = parseMultiline(multiLine);
jsDocData = dox.parseComment(multiLine, { raw: true });

// Put markdown parser on the data so it can be accessed in the template
jsDocData.md = mark;
@@ -435,7 +435,7 @@ Docker.prototype.parseSections = function(data, lang){
// end of the same comment, or if a single-line comment is started before the multiline
// So for example the following would not be treated as a multiline starter:
// ```js
// alert('foo'); // Alert some foo /* Random open comment thing
// alert('foo'); // Alert some foo /* Random open comment thing
// ```
matchable.match(lang.multiLine[0]) &&
!matchable.replace(lang.multiLine[0],'').match(lang.multiLine[1]) &&
@@ -525,8 +525,8 @@ Docker.prototype.renderCodeFile = function(sections, language, filename, cb){
headings: headings,
sidebar: this.options.sidebarState,
filename: filename.replace(this.options.inDir, '').replace(/^[\/\\]/, ''),
js: this.options.js.map(path.basename),
css: this.options.css.map(path.basename)
js: this.options.js.map(function(f){ return path.basename(f); }),
css: this.options.css.map(function(f){ return path.basename(f); })
});


128 changes: 0 additions & 128 deletions src/parseMultiLine.js

This file was deleted.

0 comments on commit 0dbf83a

Please sign in to comment.