Skip to content

Commit c1581bc

Browse files
committed
build fix: multiline brackets
1 parent 821a9d8 commit c1581bc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var tutorials_1 = require('./src/tutorials/tutorials');
1010
var publish_1 = require('./src/publish/publish');
1111
var docs_1 = require('./src/docs/docs');
1212
program
13-
.version('0.4.6')
13+
.version('0.3.7')
1414
.usage('[options] <keywords>')
1515
.option('-b, --build [path/to/tutorial.md]', 'tutorial markdown file', /^.+\.md$/i)
1616
.option('-c, --create [name]', 'tutorial name')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coderoad-cli",
3-
"version": "0.3.6",
3+
"version": "0.3.7",
44
"description": "Command line interface for CodeRoad. Build project files.",
55
"keywords": [
66
"coderoad"

src/build/parser/actions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ function trimCommandValue(text) {
1111
}
1212
exports.trimCommandValue = trimCommandValue;
1313
function getContentInBrackets(text) {
14-
return /^\((.*?)\)$/.exec(text)[1];
14+
if (text.charAt(0) === '(' && text.charAt(text.length - 1) === ')') {
15+
return text.slice(1, text.length - 1);
16+
}
17+
return '';
1518
}
1619
function addToTasks(result, line, index) {
1720
var match = Match.isAction(line);

0 commit comments

Comments
 (0)