summaryrefslogtreecommitdiff
path: root/js/lib/blocks.js
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/blocks.js
parent8950065009608ec71bd86516de8f66a9646557ee (diff)
js: 'ListItem' -> 'Item'.
Diffstat (limited to 'js/lib/blocks.js')
-rw-r--r--js/lib/blocks.js12
1 files changed, 6 insertions, 6 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));