summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-06 19:36:11 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-06 19:36:11 -0700
commitea7961d54c973a1bad276cacb4ded8337482107c (patch)
tree0fad6568242acd10836c9b3649b41efe2dbf1b7c
parent7c7d772c93a04958c695d7519e62f7b1560ecc45 (diff)
parent1bc5557108d6297350dcffae2df50c532d023396 (diff)
Merge pull request #77 from Steve-Fenton/patch-1
Minor fixes to stmd.js (non messed-up version)
-rwxr-xr-xjs/stmd.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/stmd.js b/js/stmd.js
index e6c8bdf..78ea89b 100755
--- a/js/stmd.js
+++ b/js/stmd.js
@@ -373,7 +373,7 @@ var parseEmphasis = function(inlines) {
return (this.pos - startpos);
default:
- return result;
+ return res;
}
return 0;
@@ -382,7 +382,7 @@ var parseEmphasis = function(inlines) {
// Attempt to parse link title (sans quotes), returning the string
// or null if no match.
var parseLinkTitle = function() {
- title = this.match(reLinkTitle);
+ var title = this.match(reLinkTitle);
if (title) {
// chop off quotes from title and unescape:
return unescape(title.substr(1, title.length - 2));
@@ -861,7 +861,7 @@ var parseListMarker = function(ln, offset) {
} else {
return null;
}
- blank_item = match[0].length === rest.length;
+ var blank_item = match[0].length === rest.length;
if (spaces_after_marker >= 5 ||
spaces_after_marker < 1 ||
blank_item) {
@@ -926,7 +926,7 @@ var incorporateLine = function(ln, line_number) {
switch (container.t) {
case 'BlockQuote':
- matched = indent <= 3 && ln[first_nonspace] === '>';
+ var matched = indent <= 3 && ln[first_nonspace] === '>';
if (matched) {
offset = first_nonspace + 1;
if (ln[offset] === ' ') {
@@ -1234,7 +1234,7 @@ var finalize = function(block, line_number) {
if (line_number > block.start_line) {
block.end_line = line_number - 1;
} else {
- block_end_line = line_number;
+ block.end_line = line_number;
}
switch (block.t) {