summaryrefslogtreecommitdiff
path: root/js/lib/inlines.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-09 21:52:47 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-09 21:52:47 -0800
commitd77b868584c988483fdb7892ccc5af09c6d99f1c (patch)
treea74d5d5a78e671f6a094906917912c0cd5e25364 /js/lib/inlines.js
parent0e8c3fc0f2878ad45023dc53d1fbbc53b82b94d2 (diff)
JS linter improvements.
Diffstat (limited to 'js/lib/inlines.js')
-rw-r--r--js/lib/inlines.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/js/lib/inlines.js b/js/lib/inlines.js
index 405c6c9..0b40dfd 100644
--- a/js/lib/inlines.js
+++ b/js/lib/inlines.js
@@ -6,7 +6,6 @@ var entityToChar = require('./html5-entities.js').entityToChar;
// Constants for character codes:
var C_NEWLINE = 10;
-var C_SPACE = 32;
var C_ASTERISK = 42;
var C_UNDERSCORE = 95;
var C_BACKTICK = 96;
@@ -62,18 +61,15 @@ var reLinkDestination = new RegExp(
var reEscapable = new RegExp(ESCAPABLE);
-var reAllEscapedChar = new RegExp('\\\\(' + ESCAPABLE + ')', 'g');
-
var reEntityHere = new RegExp('^' + ENTITY, 'i');
-var reEntity = new RegExp(ENTITY, 'gi');
-
var reEntityOrEscapedChar = new RegExp('\\\\' + ESCAPABLE + '|' + ENTITY, 'gi');
// Matches a string of non-special characters.
var reMain = /^[^\n`\[\]\\!<&*_]+/m;
var unescapeChar = function(s) {
+ "use strict";
if (s[0] === '\\') {
return s[1];
} else {
@@ -687,7 +683,7 @@ var parseNewline = function(block) {
if (lastc && lastc.t === 'Text') {
var sps = / *$/.exec(lastc.literal)[0].length;
if (sps > 0) {
- lastc.literal = lastc.literal.replace(/ *$/,'');
+ lastc.literal = lastc.literal.replace(/ *$/, '');
}
block.appendChild(new Node(sps >= 2 ? 'Hardbreak' : 'Softbreak'));
} else {