summaryrefslogtreecommitdiff
path: root/js/lib/blocks.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-27 12:59:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-27 12:59:42 -0700
commitc2d98840b217800c5f2dabf279ea444e65df792f (patch)
tree38e8da7e36a46170b0962788bf3a42feb3c3abb7 /js/lib/blocks.js
parent6549e9b1534d39a1d0f5d74e31edd93fba96f18a (diff)
Minor whitespace fixes.
Diffstat (limited to 'js/lib/blocks.js')
-rw-r--r--js/lib/blocks.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
index 98ad9e0..7518fef 100644
--- a/js/lib/blocks.js
+++ b/js/lib/blocks.js
@@ -330,7 +330,7 @@ var incorporateLine = function(ln, line_number) {
container.t !== 'IndentedCode' &&
container.t !== 'HtmlBlock' &&
// this is a little performance optimization:
- matchAt(/^[ #`~*+_=<>0-9-]/,ln,offset) !== -1) {
+ matchAt(/^[ #`~*+_=<>0-9-]/, ln, offset) !== -1) {
match = matchAt(/[^ ]/, ln, offset);
if (match === -1) {
@@ -370,7 +370,7 @@ var incorporateLine = function(ln, line_number) {
container.level = match[0].trim().length; // number of #s
// remove trailing ###s:
container.strings =
- [ln.slice(offset).replace(/^ *#+ *$/, '').replace(/ +#+ *$/,'')];
+ [ln.slice(offset).replace(/^ *#+ *$/, '').replace(/ +#+ *$/, '')];
break;
} else if ((match = ln.slice(first_nonspace).match(/^`{3,}(?!.*`)|^~{3,}(?!.*~)/))) {
@@ -545,7 +545,7 @@ var finalize = function(block, line_number) {
switch (block.t) {
case 'Paragraph':
- block.string_content = block.strings.join('\n').replace(/^ {2,}/m,'');
+ block.string_content = block.strings.join('\n').replace(/^ {2,}/m, '');
// delete block.strings;
// try parsing the beginning as link reference definitions:
@@ -566,7 +566,7 @@ var finalize = function(block, line_number) {
break;
case 'IndentedCode':
- block.string_content = block.strings.join('\n').replace(/(\n *)*$/,'\n');
+ block.string_content = block.strings.join('\n').replace(/(\n *)*$/, '\n');
block.t = 'CodeBlock';
break;
@@ -667,7 +667,7 @@ var parse = function(input) {
this.doc = makeBlock('Document', 1, 1);
this.tip = this.doc;
this.refmap = {};
- var lines = input.replace(/\n$/,'').split(/\r\n|\n|\r/);
+ var lines = input.replace(/\n$/, '').split(/\r\n|\n|\r/);
var len = lines.length;
for (var i = 0; i < len; i++) {
this.incorporateLine(lines[i], i + 1);