summaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-11 20:43:13 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-11 20:43:13 -0800
commit7ebd66bdda69f0d580e54b6f272d6ec7ed54fa1e (patch)
tree9c4e3c765fb03745ddeceef78c8ab8fa6d134972 /js/lib
parent8950065009608ec71bd86516de8f66a9646557ee (diff)
js: 'ListItem' -> 'Item'.
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/blocks.js12
-rw-r--r--js/lib/html.js2
-rw-r--r--js/lib/node.js2
3 files changed, 8 insertions, 8 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js
index bd00b1a..9f46a3c 100644
--- a/js/lib/blocks.js
+++ b/js/lib/blocks.js
@@ -94,8 +94,8 @@ var canContain = function(parent_type, child_type) {
"use strict";
return ( parent_type === 'Document' ||
parent_type === 'BlockQuote' ||
- parent_type === 'ListItem' ||
- (parent_type === 'List' && child_type === 'ListItem') );
+ parent_type === 'Item' ||
+ (parent_type === 'List' && child_type === 'Item') );
};
// Returns true if block type can accept lines of text.
@@ -114,7 +114,7 @@ var endsWithBlankLine = function(block) {
if (block.last_line_blank) {
return true;
}
- if (block.t === 'List' || block.t === 'ListItem') {
+ if (block.t === 'List' || block.t === 'Item') {
block = block.lastChild;
} else {
break;
@@ -286,7 +286,7 @@ var incorporateLine = function(ln, line_number) {
}
break;
- case 'ListItem':
+ case 'Item':
if (indent >= container.list_data.marker_offset +
container.list_data.padding) {
offset += container.list_data.marker_offset +
@@ -466,7 +466,7 @@ var incorporateLine = function(ln, line_number) {
}
// add the list item
- container = this.addChild('ListItem', line_number, first_nonspace);
+ container = this.addChild('Item', line_number, first_nonspace);
container.list_data = data;
} else {
@@ -516,7 +516,7 @@ var incorporateLine = function(ln, line_number) {
!(container.t === 'BlockQuote' ||
container.t === 'Header' ||
container.t === 'FencedCode' ||
- (container.t === 'ListItem' &&
+ (container.t === 'Item' &&
!container.firstChild &&
container.sourcepos[0][0] === line_number));
diff --git a/js/lib/html.js b/js/lib/html.js
index 847ed98..afe7a33 100644
--- a/js/lib/html.js
+++ b/js/lib/html.js
@@ -158,7 +158,7 @@ var renderNodes = function(block) {
}
break;
- case 'ListItem':
+ case 'Item':
if (entering) {
out(tag('li', attrs));
} else {
diff --git a/js/lib/node.js b/js/lib/node.js
index 381b379..47ae3c8 100644
--- a/js/lib/node.js
+++ b/js/lib/node.js
@@ -5,7 +5,7 @@ function isContainer(node) {
case 'Document':
case 'BlockQuote':
case 'List':
- case 'ListItem':
+ case 'Item':
case 'Paragraph':
case 'Header':
case 'Emph':