Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'jasonseney/master'

  • Loading branch information...
commit 0317e4dbbcc9b1e75d32ccb70807bb26e42df3c1 2 parents 0de73e9 + cee1cf6
@jbt authored
Showing with 6 additions and 0 deletions.
  1. +1 −0  README.md
  2. +2 −0  docker
  3. +3 −0  src/docker.js
View
1  README.md
@@ -29,6 +29,7 @@ Available options are:
* `-s` or `--sidebar`: Whether or not the sidebar should be opened by default in the output (defaults to yes, can be yes, no, true, false). Value `disable` will disable the sidebar entirely in the output.
* `-x` or `--exclude`: Comma-separated list of paths to exclude. Supports basic `*` wildcards too.
* `-n` or `--line-number`: Include line numbers in the output (default is off)
+ * `-m` or `--multi_line_only`: Whether to process _only_ multi-line comments. (Defaults to false)
* `--js`: Specify a comma-separated list of extra javascript files (relative to the current dir) to include
* `--css`: Same as for `--js` but for CSS files
* `--extras`: Comma-separated list of optional extras to activate (see below)
View
2  docker
@@ -25,6 +25,7 @@ program
.option('-s, --sidebar [state]', 'Whether the sidebar should be open or not by default', 'yes')
.option('-x, --exclude [pattern]', 'Paths to exclude', false)
.option('-n, --line-numbers', 'Whether to include line numbers in output', false)
+ .option('-m, --multi_line_only', 'Whether to process only multi-line comments', false)
.option('--js <files>', 'Additional javascript files to include', list)
.option('--css <files>', 'Additional CSS files to include', list)
.option('--extras <extras>', 'Bundled extras to include, see extras dir', list)
@@ -51,6 +52,7 @@ var opts = {
sidebarState: coerceSidebar(program.sidebar),
exclude: program.exclude,
lineNums: program.lineNumbers,
+ multiLineOnly: program.multi_line_only,
js: program.js,
css: program.css,
extras: program.extras
View
3  src/docker.js
@@ -102,6 +102,7 @@ Docker.prototype.parseOpts = function(opts){
sidebarState: true,
exclude: false,
lineNums: false,
+ multiLineOnly: false,
js: [],
css: [],
extras: []
@@ -123,6 +124,7 @@ Docker.prototype.parseOpts = function(opts){
this.lineNums = !!opts.lineNums;
this.extraJS = opts.js || [];
this.extraCSS = opts.css || [];
+ this.multiLineOnly = !!opts.multiLineOnly;
// Generate an exclude regex for the given pattern
if(typeof opts.exclude === 'string'){
@@ -571,6 +573,7 @@ Docker.prototype.parseSections = function(data, language){
}
}
if(
+ !this.multiLineOnly &&
params.comment &&
matchable.match(commentRegex) &&
(!params.commentsIgnore || !matchable.match(params.commentsIgnore)) &&
Please sign in to comment.
Something went wrong with that request. Please try again.